@phensley/locale-matcher
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -28,5 +28,3 @@ import { getRegionPartition } from './partition'; | ||
}; | ||
var _distance = function (node) { | ||
return typeof node === 'number' ? node : node[0]; | ||
}; | ||
var _distance = function (node) { return (typeof node === 'number' ? node : node[0]); }; | ||
/** | ||
@@ -33,0 +31,0 @@ * Return the distance between the desired and supported locale, stopping once |
@@ -8,3 +8,3 @@ import { parseLanguageTag, LanguageTag } from '@phensley/language-tag'; | ||
var U = undefined; | ||
var numberCmp = function (a, b) { return a === b ? 0 : a < b ? -1 : 1; }; | ||
var numberCmp = function (a, b) { return (a === b ? 0 : a < b ? -1 : 1); }; | ||
var Entry = /** @class */ (function () { | ||
@@ -193,3 +193,3 @@ function Entry(id, tag) { | ||
locale: { id: id, tag: result }, | ||
distance: bestMatch === U ? MAX_DISTANCE : bestDistance | ||
distance: bestMatch === U ? MAX_DISTANCE : bestDistance, | ||
}; | ||
@@ -196,0 +196,0 @@ }; |
@@ -30,5 +30,3 @@ "use strict"; | ||
}; | ||
var _distance = function (node) { | ||
return typeof node === 'number' ? node : node[0]; | ||
}; | ||
var _distance = function (node) { return (typeof node === 'number' ? node : node[0]); }; | ||
/** | ||
@@ -35,0 +33,0 @@ * Return the distance between the desired and supported locale, stopping once |
@@ -10,3 +10,3 @@ "use strict"; | ||
var U = undefined; | ||
var numberCmp = function (a, b) { return a === b ? 0 : a < b ? -1 : 1; }; | ||
var numberCmp = function (a, b) { return (a === b ? 0 : a < b ? -1 : 1); }; | ||
var Entry = /** @class */ (function () { | ||
@@ -195,3 +195,3 @@ function Entry(id, tag) { | ||
locale: { id: id, tag: result }, | ||
distance: bestMatch === U ? distance_1.MAX_DISTANCE : bestDistance | ||
distance: bestMatch === U ? distance_1.MAX_DISTANCE : bestDistance, | ||
}; | ||
@@ -198,0 +198,0 @@ }; |
{ | ||
"name": "@phensley/locale-matcher", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Implements CLDR enhanced language matching", | ||
@@ -39,23 +39,23 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@phensley/language-tag": "^1.2.0", | ||
"@phensley/locale": "^1.2.0", | ||
"tslib": "^1.11.1" | ||
"@phensley/language-tag": "^1.2.1", | ||
"@phensley/locale": "^1.2.1", | ||
"tslib": "^1.13.0" | ||
}, | ||
"devDependencies": { | ||
"@microsoft/api-extractor": "^7.7.13", | ||
"@microsoft/api-extractor": "^7.8.0", | ||
"@types/jest": "^25.2.1", | ||
"@types/node": "^13.13.4", | ||
"@typescript-eslint/eslint-plugin": "^2.30.0", | ||
"@typescript-eslint/parser": "^2.30.0", | ||
"@types/node": "^14.0.1", | ||
"@typescript-eslint/eslint-plugin": "^2.33.0", | ||
"@typescript-eslint/parser": "^2.33.0", | ||
"beautify-benchmark": "^0.2.4", | ||
"benchmark": "^2.1.4", | ||
"chalk": "^4.0.0", | ||
"eslint": "^6.8.0", | ||
"eslint": "^7.0.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"eslint-plugin-prettier": "^3.1.3", | ||
"jest": "^25.4.0", | ||
"jest": "^26.0.1", | ||
"prettier": "^2.0.5", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^25.4.0", | ||
"typescript": "^3.8.3" | ||
"ts-jest": "^25.5.1", | ||
"typescript": "~3.8.3" | ||
}, | ||
@@ -75,3 +75,3 @@ "jest": { | ||
}, | ||
"gitHead": "42b88fa1fa672c12a88dfe4fea152d1eb614e919" | ||
"gitHead": "b4e3308079a0bcb58a666cd94c248ffd452b2486" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
242163
1109
Updated@phensley/locale@^1.2.1
Updatedtslib@^1.13.0