Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hex/src/fw/service/deps.ts>oak.Request#acceptsLanguages

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
method oak.Request.prototype.acceptsLanguages
import { oak } from "https://deno.land/x/hex@0.6.5/src/fw/service/deps.ts";
const { Request } = oak;

Returns an array of languages, accepted by the requestor, in order of preference. If there are no languages supplied by the requestor, ["*"] is returned, indicating any language is accepted.

Returns

string[] | undefined

For a given set of languages, return the best match accepted by the requestor. If there are no languages that match, then the method returns undefined.

Parameters

...langs: string[]

Returns

string | undefined