Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 | 3x 1x 2x 2x 2x | export function parseAcceptLanguage(acceptLanguage = ""): string[] {
const languages = acceptLanguage.split(",").map((lang) => {
const [code, q = "1"] = lang.trim().split(";q=");
return { code: code.trim(), q: parseFloat(q) };
});
return languages.toSorted((a, b) => b.q - a.q).map(({ code }) => code);
}
|