resolve-accept-language 1.1.39 → 1.1.41
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/lookup-list.d.ts +8 -4
- package/lib/lookup-list.js +8 -4
- package/package.json +8 -7
package/lib/lookup-list.d.ts
CHANGED
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
export default class LookupList {
|
|
3
3
|
/** The list of locales used to get the match during the lookup. */
|
|
4
4
|
private localeList;
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
5
|
+
/**
|
|
6
|
+
* Data object where the properties are quality (in string format) and their values a set containing locale
|
|
7
|
+
* identifiers using the `language`-`country` format and ISO 639-1 alpha-2 language code.
|
|
8
|
+
*/
|
|
7
9
|
private localesAndLanguagesByQuality;
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
+
/**
|
|
11
|
+
* Data object where the properties are quality (in string format) and their value a set of ISO 639-1 alpha-2
|
|
12
|
+
* language code.
|
|
13
|
+
*/
|
|
10
14
|
private relatedLocaleLanguagesByQuality;
|
|
11
15
|
/**
|
|
12
16
|
* Create a new `LookupList` object.
|
package/lib/lookup-list.js
CHANGED
|
@@ -11,11 +11,15 @@ var LookupList = /** @class */ (function () {
|
|
|
11
11
|
* likely to be matched than the last identifier.
|
|
12
12
|
*/
|
|
13
13
|
function LookupList(acceptLanguageHeader, locales) {
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
14
|
+
/**
|
|
15
|
+
* Data object where the properties are quality (in string format) and their values a set containing locale
|
|
16
|
+
* identifiers using the `language`-`country` format and ISO 639-1 alpha-2 language code.
|
|
17
|
+
*/
|
|
16
18
|
this.localesAndLanguagesByQuality = {};
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
+
/**
|
|
20
|
+
* Data object where the properties are quality (in string format) and their value a set of ISO 639-1 alpha-2
|
|
21
|
+
* language code.
|
|
22
|
+
*/
|
|
19
23
|
this.relatedLocaleLanguagesByQuality = {};
|
|
20
24
|
this.localeList = new locale_list_1.default(locales);
|
|
21
25
|
var directiveStrings = acceptLanguageHeader
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resolve-accept-language",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.41",
|
|
4
4
|
"description": "Resolve the preferred locale based on the value of an `Accept-Language` HTTP header.",
|
|
5
5
|
"author": "Avansai (https://avansai.com)",
|
|
6
6
|
"repository": {
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
],
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@release-it/conventional-changelog": "^5.1.1",
|
|
41
|
-
"@types/jest": "^29.
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
43
|
-
"@typescript-eslint/parser": "^5.
|
|
41
|
+
"@types/jest": "^29.4.0",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^5.50.0",
|
|
43
|
+
"@typescript-eslint/parser": "^5.50.0",
|
|
44
44
|
"dotenv-cli": "^7.0.0",
|
|
45
|
-
"eslint": "^8.
|
|
45
|
+
"eslint": "^8.33.0",
|
|
46
46
|
"eslint-config-prettier": "^8.6.0",
|
|
47
47
|
"eslint-import-resolver-node": "^0.3.7",
|
|
48
48
|
"eslint-import-resolver-typescript": "^3.5.3",
|
|
@@ -50,15 +50,16 @@
|
|
|
50
50
|
"eslint-plugin-jest": "^27.2.1",
|
|
51
51
|
"eslint-plugin-prefer-arrow-functions": "^3.1.4",
|
|
52
52
|
"eslint-plugin-prettier": "^4.2.1",
|
|
53
|
+
"eslint-plugin-tsdoc": "^0.2.17",
|
|
53
54
|
"eslint-plugin-unicorn": "^45.0.2",
|
|
54
|
-
"jest": "^29.
|
|
55
|
+
"jest": "^29.4.1",
|
|
55
56
|
"prettier": "^2.8.3",
|
|
56
57
|
"prettier-plugin-organize-imports": "^3.2.2",
|
|
57
58
|
"prettier-plugin-sh": "^0.12.8",
|
|
58
59
|
"release-it": "^15.6.0",
|
|
59
60
|
"ts-jest": "^29.0.5",
|
|
60
61
|
"ts-node": "^10.9.1",
|
|
61
|
-
"typescript": "^4.9.
|
|
62
|
+
"typescript": "^4.9.5"
|
|
62
63
|
},
|
|
63
64
|
"engines": {
|
|
64
65
|
"node": "^14.18.1 || >=16.0.0"
|