Skip to main content
Latest
method oak.Request.prototype.acceptsLanguages
import { oak } from "https://deno.land/x/create_react_app@v0.1.2/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, undefined is returned.

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