@formatjs/intl-numberformat 8.7.1 → 8.7.2
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/package.json +5 -5
- package/polyfill.iife.js +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-numberformat",
|
|
3
|
-
"version": "8.7.
|
|
3
|
+
"version": "8.7.2",
|
|
4
4
|
"description": "Ponyfill for ES2020 Intl.NumberFormat",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"polyfill",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"url": "git+https://github.com/formatjs/formatjs.git"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@formatjs/ecma402-abstract": "1.17.
|
|
26
|
-
"@formatjs/intl-localematcher": "0.4.
|
|
25
|
+
"@formatjs/ecma402-abstract": "1.17.2",
|
|
26
|
+
"@formatjs/intl-localematcher": "0.4.2",
|
|
27
27
|
"tslib": "^2.4.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@formatjs/intl-getcanonicallocales": "2.2.1",
|
|
31
|
-
"@formatjs/intl-locale": "3.3.
|
|
32
|
-
"@formatjs/intl-pluralrules": "5.2.
|
|
31
|
+
"@formatjs/intl-locale": "3.3.4",
|
|
32
|
+
"@formatjs/intl-pluralrules": "5.2.6"
|
|
33
33
|
},
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/formatjs/formatjs/issues"
|
package/polyfill.iife.js
CHANGED
|
@@ -1773,7 +1773,7 @@
|
|
|
1773
1773
|
if (availableLocale) {
|
|
1774
1774
|
result.locale = availableLocale;
|
|
1775
1775
|
if (locale !== noExtensionLocale) {
|
|
1776
|
-
result.extension = locale.slice(noExtensionLocale.length
|
|
1776
|
+
result.extension = locale.slice(noExtensionLocale.length, locale.length);
|
|
1777
1777
|
}
|
|
1778
1778
|
return result;
|
|
1779
1779
|
}
|
|
@@ -1799,12 +1799,16 @@
|
|
|
1799
1799
|
minimizedAvailableLocales.add(canonicalizedLocale);
|
|
1800
1800
|
});
|
|
1801
1801
|
var foundLocale;
|
|
1802
|
+
var extension;
|
|
1802
1803
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
1803
1804
|
var l = requestedLocales_1[_i];
|
|
1804
1805
|
if (foundLocale) {
|
|
1805
1806
|
break;
|
|
1806
1807
|
}
|
|
1807
1808
|
var noExtensionLocale = l.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, "");
|
|
1809
|
+
if (l !== noExtensionLocale) {
|
|
1810
|
+
extension = l.slice(noExtensionLocale.length, l.length);
|
|
1811
|
+
}
|
|
1808
1812
|
if (availableLocales.has(noExtensionLocale)) {
|
|
1809
1813
|
foundLocale = noExtensionLocale;
|
|
1810
1814
|
break;
|
|
@@ -1826,7 +1830,8 @@
|
|
|
1826
1830
|
return { locale: getDefaultLocale() };
|
|
1827
1831
|
}
|
|
1828
1832
|
return {
|
|
1829
|
-
locale: availableLocaleMap[foundLocale] || canonicalizedLocaleMap[foundLocale] || minimizedAvailableLocaleMap[foundLocale] || foundLocale
|
|
1833
|
+
locale: availableLocaleMap[foundLocale] || canonicalizedLocaleMap[foundLocale] || minimizedAvailableLocaleMap[foundLocale] || foundLocale,
|
|
1834
|
+
extension
|
|
1830
1835
|
};
|
|
1831
1836
|
}
|
|
1832
1837
|
|