Nonstop Progressive Marxism

    @types/accept-language-parser
    TypeScript icon, indicating that this package has built-in type declarations

    1.5.3 • Public • Published

    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

    // Type definitions for accept-language-parser 1.5
    // Project: https://github.com/opentable/accept-language-parser
    // Definitions by: Niklas Wulf <https://github.com/kampfgnom>
    //                 Wooram Jun <https://github.com/chatoo2412>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    // TypeScript Version: 2.1
    
    // 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: 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: Mon, 08 Nov 2021 11:31:29 GMT
    • Dependencies: none
    • Global values: none

    Credits

    These definitions were written by Niklas Wulf, and Wooram Jun.

    Keywords

    none

    Install

    npm i @types/accept-language-parser

    DownloadsWeekly Downloads

    74,148

    Version

    1.5.3

    License

    MIT

    Unpacked Size

    4.54 kB

    Total Files

    4

    Last publish

    Collaborators

    • types