UNPKG

@types/accept-language-parser

Version:
39 lines (30 loc) 1.17 kB
# Installation > `npm install --save @types/accept-language-parser` # Summary This package contains type definitions for accept-language-parser (https://github.com/opentable/accept-language-parser). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/accept-language-parser. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/accept-language-parser/index.d.ts) ````ts // https://github.com/opentable/accept-language-parser/blob/v1.5.0/index.js export function parse(acceptLanguage?: string): Language[]; export function pick<T extends string>( supportedLanguages: readonly T[], acceptLanguage: string | Language[], options?: PickOptions, ): T | null; export interface Language { code: string; script?: string | null | undefined; region?: string | undefined; quality: number; } export interface PickOptions { loose?: boolean | undefined; } ```` ### Additional Details * Last updated: Tue, 06 May 2025 07:34:17 GMT * Dependencies: none # Credits These definitions were written by [Wooram Jun](https://github.com/chatoo2412).