resolve-accept-language 3.1.1 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.d.ts +2 -2
- package/lib/esm/index.d.ts +2 -2
- package/package.json +6 -6
package/lib/cjs/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ type Options<WithMatchType extends boolean | undefined> = {
|
|
|
13
13
|
/** Should the country of the locale be used for matching? */
|
|
14
14
|
matchCountry?: boolean;
|
|
15
15
|
};
|
|
16
|
-
type Result<Locales extends string[], WithMatchType extends boolean | undefined> = WithMatchType extends true ? {
|
|
16
|
+
type Result<Locales extends readonly string[], WithMatchType extends boolean | undefined> = WithMatchType extends true ? {
|
|
17
17
|
/** The best locale match. */
|
|
18
18
|
match: NormalizeLocale<Locales[number]>;
|
|
19
19
|
/** The type of match. */
|
|
@@ -40,5 +40,5 @@ type Result<Locales extends string[], WithMatchType extends boolean | undefined>
|
|
|
40
40
|
* 'en-US'
|
|
41
41
|
* )
|
|
42
42
|
*/
|
|
43
|
-
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>;
|
|
43
|
+
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>;
|
|
44
44
|
export {};
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ type Options<WithMatchType extends boolean | undefined> = {
|
|
|
13
13
|
/** Should the country of the locale be used for matching? */
|
|
14
14
|
matchCountry?: boolean;
|
|
15
15
|
};
|
|
16
|
-
type Result<Locales extends string[], WithMatchType extends boolean | undefined> = WithMatchType extends true ? {
|
|
16
|
+
type Result<Locales extends readonly string[], WithMatchType extends boolean | undefined> = WithMatchType extends true ? {
|
|
17
17
|
/** The best locale match. */
|
|
18
18
|
match: NormalizeLocale<Locales[number]>;
|
|
19
19
|
/** The type of match. */
|
|
@@ -40,5 +40,5 @@ type Result<Locales extends string[], WithMatchType extends boolean | undefined>
|
|
|
40
40
|
* 'en-US'
|
|
41
41
|
* )
|
|
42
42
|
*/
|
|
43
|
-
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>;
|
|
43
|
+
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>;
|
|
44
44
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resolve-accept-language",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3",
|
|
4
4
|
"description": "Resolve the preferred locale based on the value of an `Accept-Language` HTTP header.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accept-language",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@eslint/js": "^8.57.0",
|
|
54
54
|
"@release-it/conventional-changelog": "8.0.1",
|
|
55
55
|
"@types/jest": "29.5.12",
|
|
56
|
-
"@types/node": "^20.11.
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "7.
|
|
58
|
-
"@typescript-eslint/parser": "7.
|
|
56
|
+
"@types/node": "^20.11.30",
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "7.3.1",
|
|
58
|
+
"@typescript-eslint/parser": "7.3.1",
|
|
59
59
|
"depcheck": "^1.4.7",
|
|
60
60
|
"dotenv-cli": "7.4.1",
|
|
61
61
|
"eslint": "8.57.0",
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
"prettier-plugin-organize-imports": "3.2.4",
|
|
78
78
|
"prettier-plugin-sh": "0.14.0",
|
|
79
79
|
"release-it": "17.1.1",
|
|
80
|
-
"terser": "^5.29.
|
|
80
|
+
"terser": "^5.29.2",
|
|
81
81
|
"ts-jest": "29.1.2",
|
|
82
|
-
"typescript": "5.4.
|
|
82
|
+
"typescript": "5.4.3"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": "^14.18.1 || >=16.0.0"
|