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

1.5.6 • 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

// 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, 06 Nov 2023 22:41:04 GMT
  • Dependencies: none

Credits

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

Versions

Current Tags

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.5.6
    59,414
  • 1.5.5
    1,562
  • 1.5.4
    908
  • 1.5.3
    28,815
  • 1.5.2
    2,016
  • 1.5.1
    16,255
  • 1.5.0
    15,088
  • 1.4.0
    0

Package Sidebar

Install

npm i @types/accept-language-parser

Weekly Downloads

124,058

Version

1.5.6

License

MIT

Unpacked Size

3.85 kB

Total Files

5

Last publish

Collaborators

  • types