Module

x/opine/deps.ts>Accepts#charsets

Fast, minimalist web framework for Deno ported from ExpressJS.
Go to Latest
method Accepts.prototype.charsets
import { Accepts } from "https://dotland.deno.dev/x/opine@2.2.0/deps.ts";

Return accepted charsets or best fit based on charsets.

Given Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5 an array sorted by quality is returned:

['utf-8', 'utf-7', 'iso-8859-1']

Parameters

optional
charsets: string[]

Returns

string[] | string | false