@formatjs/intl-localematcher 0.5.10 → 0.6.1

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/abstract/utils.js CHANGED
@@ -59,7 +59,7 @@ function isMatched(locale, languageMatchInfoLocale, matchVariables) {
59
59
  var expandedMatchedRegions = matchRegions
60
60
  .map(function (r) { return regions_generated_1.regions[r] || [r]; })
61
61
  .reduce(function (all, list) { return tslib_1.__spreadArray(tslib_1.__spreadArray([], all, true), list, true); }, []);
62
- matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || '') > 1 !=
62
+ matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || '') > -1 !=
63
63
  shouldInclude));
64
64
  }
65
65
  else {
@@ -130,7 +130,7 @@ function findMatchingDistance(desired, supported) {
130
130
  region: '',
131
131
  }, {
132
132
  language: supportedLocale.language,
133
- script: desiredLSR.script,
133
+ script: supportedLSR.script,
134
134
  region: '',
135
135
  }, data);
136
136
  }
@@ -53,7 +53,7 @@ function isMatched(locale, languageMatchInfoLocale, matchVariables) {
53
53
  var expandedMatchedRegions = matchRegions
54
54
  .map(function (r) { return regions[r] || [r]; })
55
55
  .reduce(function (all, list) { return __spreadArray(__spreadArray([], all, true), list, true); }, []);
56
- matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || '') > 1 !=
56
+ matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || '') > -1 !=
57
57
  shouldInclude));
58
58
  }
59
59
  else {
@@ -124,7 +124,7 @@ export function findMatchingDistance(desired, supported) {
124
124
  region: '',
125
125
  }, {
126
126
  language: supportedLocale.language,
127
- script: desiredLSR.script,
127
+ script: supportedLSR.script,
128
128
  region: '',
129
129
  }, data);
130
130
  }
package/package.json CHANGED
@@ -1,30 +1,25 @@
1
1
  {
2
2
  "name": "@formatjs/intl-localematcher",
3
- "version": "0.5.10",
4
3
  "description": "Intl.LocaleMatcher ponyfill",
4
+ "version": "0.6.1",
5
+ "license": "MIT",
6
+ "author": "Long Ho <holevietlong@gmail.com>",
7
+ "types": "index.d.ts",
8
+ "dependencies": {
9
+ "tslib": "^2.8.0"
10
+ },
11
+ "bugs": "https://github.com/formatjs/formatjs/issues",
12
+ "homepage": "https://github.com/formatjs/formatjs#readme",
5
13
  "keywords": [
14
+ "ecma402",
15
+ "formatjs",
16
+ "i18n",
6
17
  "intl",
7
18
  "locale",
8
- "formatjs",
9
19
  "react-intl",
10
- "i18n",
11
- "ecma402",
12
20
  "tc39"
13
21
  ],
14
- "author": "Long Ho <holevietlong@gmail.com>",
15
- "homepage": "https://github.com/formatjs/formatjs#readme",
16
- "license": "MIT",
17
22
  "main": "index.js",
18
23
  "module": "lib/index.js",
19
- "types": "index.d.ts",
20
- "repository": {
21
- "type": "git",
22
- "url": "git+https://github.com/formatjs/formatjs.git"
23
- },
24
- "bugs": {
25
- "url": "https://github.com/formatjs/formatjs/issues"
26
- },
27
- "dependencies": {
28
- "tslib": "2"
29
- }
24
+ "repository": "formatjs/formatjs.git"
30
25
  }