@trenskow/language 1.2.8 → 1.2.10
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/index.js +2 -2
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -121,8 +121,8 @@ const match = (identifier, supported, def) => {
|
|
|
121
121
|
})
|
|
122
122
|
// Take each user requested languages.
|
|
123
123
|
.reduce((res, language) => {
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
// Compare them to the supported languages.
|
|
125
|
+
// We use a point system to determine the best match.
|
|
126
126
|
return res.concat(...supportedExpanded.map((supported) => {
|
|
127
127
|
let result = 0.0;
|
|
128
128
|
let supportedParts = parts(supported);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trenskow/language",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.10",
|
|
4
4
|
"description": "A small library for getting a full language identifier (RFC 5646).",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"homepage": "https://github.com/trenskow/language#readme",
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"chai": "^4.3.7",
|
|
21
|
-
"eslint": "^8.
|
|
21
|
+
"eslint": "^8.47.0",
|
|
22
22
|
"mocha": "^10.2.0"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@trenskow/localization-data": "^1.2.
|
|
25
|
+
"@trenskow/localization-data": "^1.2.4"
|
|
26
26
|
}
|
|
27
27
|
}
|