resolve-accept-language
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -16,3 +16,3 @@ /** The type of matches. */ | ||
}; | ||
type Result<Locales extends string[], WithMatchType extends boolean | undefined> = WithMatchType extends true ? { | ||
type Result<Locales extends readonly string[], WithMatchType extends boolean | undefined> = WithMatchType extends true ? { | ||
/** The best locale match. */ | ||
@@ -44,3 +44,3 @@ match: NormalizeLocale<Locales[number]>; | ||
*/ | ||
export declare const resolveAcceptLanguage: <Locales extends string[], WithMatchType extends boolean | undefined = undefined>(acceptLanguageHeader: string, locales: Locales, defaultLocale: Locales[number], options?: Options<WithMatchType>) => Result<Locales, WithMatchType>; | ||
export declare const resolveAcceptLanguage: <Locales extends readonly string[], WithMatchType extends boolean | undefined = undefined>(acceptLanguageHeader: string, locales: Locales, defaultLocale: Locales[number], options?: Options<WithMatchType>) => Result<Locales, WithMatchType>; | ||
export {}; |
@@ -16,3 +16,3 @@ /** The type of matches. */ | ||
}; | ||
type Result<Locales extends string[], WithMatchType extends boolean | undefined> = WithMatchType extends true ? { | ||
type Result<Locales extends readonly string[], WithMatchType extends boolean | undefined> = WithMatchType extends true ? { | ||
/** The best locale match. */ | ||
@@ -44,3 +44,3 @@ match: NormalizeLocale<Locales[number]>; | ||
*/ | ||
export declare const resolveAcceptLanguage: <Locales extends string[], WithMatchType extends boolean | undefined = undefined>(acceptLanguageHeader: string, locales: Locales, defaultLocale: Locales[number], options?: Options<WithMatchType>) => Result<Locales, WithMatchType>; | ||
export declare const resolveAcceptLanguage: <Locales extends readonly string[], WithMatchType extends boolean | undefined = undefined>(acceptLanguageHeader: string, locales: Locales, defaultLocale: Locales[number], options?: Options<WithMatchType>) => Result<Locales, WithMatchType>; | ||
export {}; |
{ | ||
"name": "resolve-accept-language", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "Resolve the preferred locale based on the value of an `Accept-Language` HTTP header.", | ||
@@ -56,5 +56,5 @@ "keywords": [ | ||
"@types/jest": "29.5.12", | ||
"@types/node": "^20.11.25", | ||
"@typescript-eslint/eslint-plugin": "7.1.1", | ||
"@typescript-eslint/parser": "7.1.1", | ||
"@types/node": "^20.11.27", | ||
"@typescript-eslint/eslint-plugin": "7.2.0", | ||
"@typescript-eslint/parser": "7.2.0", | ||
"depcheck": "^1.4.7", | ||
@@ -61,0 +61,0 @@ "dotenv-cli": "7.4.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35922
232