@formatjs/intl-numberformat 8.8.1 → 8.9.0
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/LICENSE.md +1 -1
- package/lib/index.js +1 -4
- package/lib/polyfill-force.js +6 -8
- package/lib/polyfill.js +8 -10
- package/lib/should-polyfill.js +4 -8
- package/lib/src/core.js +52 -56
- package/lib/src/currency-digits.generated.js +1 -4
- package/lib/src/get_internal_slots.js +1 -4
- package/lib/src/numbering-systems.generated.js +1 -4
- package/lib/src/to_locale_string.js +3 -7
- package/lib/src/types.js +1 -2
- package/lib/supported-locales.generated.js +1 -4
- package/package.json +6 -6
- package/polyfill.iife.js +6460 -7900
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2023 FormatJS
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
package/lib/index.js
CHANGED
package/lib/polyfill-force.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
(0, ecma402_abstract_1.defineProperty)(Intl, 'NumberFormat', { value: core_1.NumberFormat });
|
|
7
|
-
(0, ecma402_abstract_1.defineProperty)(Number.prototype, 'toLocaleString', {
|
|
1
|
+
import { NumberFormat } from './src/core';
|
|
2
|
+
import { toLocaleString as _toLocaleString } from './src/to_locale_string';
|
|
3
|
+
import { defineProperty } from '@formatjs/ecma402-abstract';
|
|
4
|
+
defineProperty(Intl, 'NumberFormat', { value: NumberFormat });
|
|
5
|
+
defineProperty(Number.prototype, 'toLocaleString', {
|
|
8
6
|
value: function toLocaleString(locales, options) {
|
|
9
|
-
return (
|
|
7
|
+
return _toLocaleString(this, locales, options);
|
|
10
8
|
},
|
|
11
9
|
});
|
package/lib/polyfill.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
(0, ecma402_abstract_1.defineProperty)(Intl, 'NumberFormat', { value: core_1.NumberFormat });
|
|
9
|
-
(0, ecma402_abstract_1.defineProperty)(Number.prototype, 'toLocaleString', {
|
|
1
|
+
import { NumberFormat } from './src/core';
|
|
2
|
+
import { toLocaleString as _toLocaleString } from './src/to_locale_string';
|
|
3
|
+
import { defineProperty } from '@formatjs/ecma402-abstract';
|
|
4
|
+
import { shouldPolyfill } from './should-polyfill';
|
|
5
|
+
if (shouldPolyfill()) {
|
|
6
|
+
defineProperty(Intl, 'NumberFormat', { value: NumberFormat });
|
|
7
|
+
defineProperty(Number.prototype, 'toLocaleString', {
|
|
10
8
|
value: function toLocaleString(locales, options) {
|
|
11
|
-
return (
|
|
9
|
+
return _toLocaleString(this, locales, options);
|
|
12
10
|
},
|
|
13
11
|
});
|
|
14
12
|
}
|
package/lib/should-polyfill.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.shouldPolyfill = void 0;
|
|
4
|
-
var intl_localematcher_1 = require("@formatjs/intl-localematcher");
|
|
5
|
-
var supported_locales_generated_1 = require("./supported-locales.generated");
|
|
1
|
+
import { match } from '@formatjs/intl-localematcher';
|
|
2
|
+
import { supportedLocales } from './supported-locales.generated';
|
|
6
3
|
/**
|
|
7
4
|
* Check if this is old Node that only supports en
|
|
8
5
|
* @returns
|
|
@@ -44,14 +41,13 @@ function supportedLocalesOf(locale) {
|
|
|
44
41
|
var locales = Array.isArray(locale) ? locale : [locale];
|
|
45
42
|
return Intl.NumberFormat.supportedLocalesOf(locales).length === locales.length;
|
|
46
43
|
}
|
|
47
|
-
function shouldPolyfill(locale) {
|
|
44
|
+
export function shouldPolyfill(locale) {
|
|
48
45
|
if (locale === void 0) { locale = 'en'; }
|
|
49
46
|
if (typeof Intl === 'undefined' ||
|
|
50
47
|
!('NumberFormat' in Intl) ||
|
|
51
48
|
!supportsES2020() ||
|
|
52
49
|
onlySupportsEn() ||
|
|
53
50
|
!supportedLocalesOf(locale)) {
|
|
54
|
-
return locale ?
|
|
51
|
+
return locale ? match([locale], supportedLocales, 'en') : undefined;
|
|
55
52
|
}
|
|
56
53
|
}
|
|
57
|
-
exports.shouldPolyfill = shouldPolyfill;
|
package/lib/src/core.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
6
|
-
var currency_digits_generated_1 = require("./currency-digits.generated");
|
|
7
|
-
var numbering_systems_generated_1 = require("./numbering-systems.generated");
|
|
1
|
+
import { CanonicalizeLocaleList, FormatNumericRange, FormatNumericRangeToParts, FormatNumericToParts, InitializeNumberFormat, OrdinaryHasInstance, SupportedLocales, ToNumber, defineProperty, invariant, } from '@formatjs/ecma402-abstract';
|
|
2
|
+
import { currencyDigitsData } from './currency-digits.generated';
|
|
3
|
+
import { numberingSystemNames } from './numbering-systems.generated';
|
|
8
4
|
// eslint-disable-next-line import/no-cycle
|
|
9
|
-
|
|
5
|
+
import getInternalSlots from './get_internal_slots';
|
|
10
6
|
var RESOLVED_OPTIONS_KEYS = [
|
|
11
7
|
'locale',
|
|
12
8
|
'numberingSystem',
|
|
@@ -29,23 +25,23 @@ var RESOLVED_OPTIONS_KEYS = [
|
|
|
29
25
|
/**
|
|
30
26
|
* https://tc39.es/ecma402/#sec-intl-numberformat-constructor
|
|
31
27
|
*/
|
|
32
|
-
|
|
28
|
+
export var NumberFormat = function (locales, options) {
|
|
33
29
|
// Cannot use `new.target` bc of IE11 & TS transpiles it to something else
|
|
34
|
-
if (!this || !
|
|
35
|
-
return new
|
|
30
|
+
if (!this || !OrdinaryHasInstance(NumberFormat, this)) {
|
|
31
|
+
return new NumberFormat(locales, options);
|
|
36
32
|
}
|
|
37
|
-
|
|
38
|
-
getInternalSlots:
|
|
39
|
-
localeData:
|
|
40
|
-
availableLocales:
|
|
41
|
-
getDefaultLocale:
|
|
42
|
-
currencyDigitsData:
|
|
43
|
-
numberingSystemNames:
|
|
33
|
+
InitializeNumberFormat(this, locales, options, {
|
|
34
|
+
getInternalSlots: getInternalSlots,
|
|
35
|
+
localeData: NumberFormat.localeData,
|
|
36
|
+
availableLocales: NumberFormat.availableLocales,
|
|
37
|
+
getDefaultLocale: NumberFormat.getDefaultLocale,
|
|
38
|
+
currencyDigitsData: currencyDigitsData,
|
|
39
|
+
numberingSystemNames: numberingSystemNames,
|
|
44
40
|
});
|
|
45
|
-
var internalSlots = (
|
|
41
|
+
var internalSlots = getInternalSlots(this);
|
|
46
42
|
var dataLocale = internalSlots.dataLocale;
|
|
47
|
-
var dataLocaleData =
|
|
48
|
-
|
|
43
|
+
var dataLocaleData = NumberFormat.localeData[dataLocale];
|
|
44
|
+
invariant(dataLocaleData !== undefined, "Cannot load locale-dependent data for ".concat(dataLocale, "."));
|
|
49
45
|
internalSlots.pl = new Intl.PluralRules(dataLocale, {
|
|
50
46
|
minimumFractionDigits: internalSlots.minimumFractionDigits,
|
|
51
47
|
maximumFractionDigits: internalSlots.maximumFractionDigits,
|
|
@@ -56,15 +52,15 @@ exports.NumberFormat = function (locales, options) {
|
|
|
56
52
|
return this;
|
|
57
53
|
};
|
|
58
54
|
function formatToParts(x) {
|
|
59
|
-
return
|
|
60
|
-
getInternalSlots:
|
|
55
|
+
return FormatNumericToParts(this, toNumeric(x), {
|
|
56
|
+
getInternalSlots: getInternalSlots,
|
|
61
57
|
});
|
|
62
58
|
}
|
|
63
59
|
function formatRange(start, end) {
|
|
64
|
-
return
|
|
60
|
+
return FormatNumericRange(this, start, end, { getInternalSlots: getInternalSlots });
|
|
65
61
|
}
|
|
66
62
|
function formatRangeToParts(start, end) {
|
|
67
|
-
return
|
|
63
|
+
return FormatNumericRangeToParts(this, start, end, { getInternalSlots: getInternalSlots });
|
|
68
64
|
}
|
|
69
65
|
try {
|
|
70
66
|
Object.defineProperty(formatToParts, 'name', {
|
|
@@ -78,21 +74,21 @@ catch (e) {
|
|
|
78
74
|
// In older browser (e.g Chrome 36 like polyfill.io)
|
|
79
75
|
// TypeError: Cannot redefine property: name
|
|
80
76
|
}
|
|
81
|
-
|
|
77
|
+
defineProperty(NumberFormat.prototype, 'formatToParts', {
|
|
82
78
|
value: formatToParts,
|
|
83
79
|
});
|
|
84
|
-
|
|
80
|
+
defineProperty(NumberFormat.prototype, 'formatRange', {
|
|
85
81
|
value: formatRange,
|
|
86
82
|
});
|
|
87
|
-
|
|
83
|
+
defineProperty(NumberFormat.prototype, 'formatRangeToParts', {
|
|
88
84
|
value: formatRangeToParts,
|
|
89
85
|
});
|
|
90
|
-
|
|
86
|
+
defineProperty(NumberFormat.prototype, 'resolvedOptions', {
|
|
91
87
|
value: function resolvedOptions() {
|
|
92
|
-
if (typeof this !== 'object' || !
|
|
88
|
+
if (typeof this !== 'object' || !OrdinaryHasInstance(NumberFormat, this)) {
|
|
93
89
|
throw TypeError('Method Intl.NumberFormat.prototype.resolvedOptions called on incompatible receiver');
|
|
94
90
|
}
|
|
95
|
-
var internalSlots = (
|
|
91
|
+
var internalSlots = getInternalSlots(this);
|
|
96
92
|
var ro = {};
|
|
97
93
|
for (var _i = 0, RESOLVED_OPTIONS_KEYS_1 = RESOLVED_OPTIONS_KEYS; _i < RESOLVED_OPTIONS_KEYS_1.length; _i++) {
|
|
98
94
|
var key = RESOLVED_OPTIONS_KEYS_1[_i];
|
|
@@ -117,10 +113,10 @@ var formatDescriptor = {
|
|
|
117
113
|
enumerable: false,
|
|
118
114
|
configurable: true,
|
|
119
115
|
get: function () {
|
|
120
|
-
if (typeof this !== 'object' || !
|
|
116
|
+
if (typeof this !== 'object' || !OrdinaryHasInstance(NumberFormat, this)) {
|
|
121
117
|
throw TypeError('Intl.NumberFormat format property accessor called on incompatible receiver');
|
|
122
118
|
}
|
|
123
|
-
var internalSlots = (
|
|
119
|
+
var internalSlots = getInternalSlots(this);
|
|
124
120
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
125
121
|
var numberFormat = this;
|
|
126
122
|
var boundFormat = internalSlots.boundFormat;
|
|
@@ -165,14 +161,14 @@ catch (e) {
|
|
|
165
161
|
// In older browser (e.g Chrome 36 like polyfill.io)
|
|
166
162
|
// TypeError: Cannot redefine property: name
|
|
167
163
|
}
|
|
168
|
-
Object.defineProperty(
|
|
164
|
+
Object.defineProperty(NumberFormat.prototype, 'format', formatDescriptor);
|
|
169
165
|
// Static properties
|
|
170
|
-
|
|
166
|
+
defineProperty(NumberFormat, 'supportedLocalesOf', {
|
|
171
167
|
value: function supportedLocalesOf(locales, options) {
|
|
172
|
-
return
|
|
168
|
+
return SupportedLocales(NumberFormat.availableLocales, CanonicalizeLocaleList(locales), options);
|
|
173
169
|
},
|
|
174
170
|
});
|
|
175
|
-
|
|
171
|
+
NumberFormat.__addLocaleData = function __addLocaleData() {
|
|
176
172
|
var data = [];
|
|
177
173
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
178
174
|
data[_i] = arguments[_i];
|
|
@@ -182,17 +178,17 @@ exports.NumberFormat.__addLocaleData = function __addLocaleData() {
|
|
|
182
178
|
var minimizedLocale = new Intl.Locale(locale)
|
|
183
179
|
.minimize()
|
|
184
180
|
.toString();
|
|
185
|
-
|
|
181
|
+
NumberFormat.localeData[locale] = NumberFormat.localeData[minimizedLocale] =
|
|
186
182
|
d;
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
if (!
|
|
190
|
-
|
|
183
|
+
NumberFormat.availableLocales.add(minimizedLocale);
|
|
184
|
+
NumberFormat.availableLocales.add(locale);
|
|
185
|
+
if (!NumberFormat.__defaultLocale) {
|
|
186
|
+
NumberFormat.__defaultLocale = minimizedLocale;
|
|
191
187
|
}
|
|
192
188
|
}
|
|
193
189
|
};
|
|
194
|
-
|
|
195
|
-
var _a =
|
|
190
|
+
NumberFormat.__addUnitData = function __addUnitData(locale, unitsData) {
|
|
191
|
+
var _a = NumberFormat.localeData, _b = locale, existingData = _a[_b];
|
|
196
192
|
if (!existingData) {
|
|
197
193
|
throw new Error("Locale data for \"".concat(locale, "\" has not been loaded in NumberFormat. \nPlease __addLocaleData before adding additional unit data"));
|
|
198
194
|
}
|
|
@@ -203,23 +199,23 @@ exports.NumberFormat.__addUnitData = function __addUnitData(locale, unitsData) {
|
|
|
203
199
|
existingData.units.compound[unit] = unitsData.compound[unit];
|
|
204
200
|
}
|
|
205
201
|
};
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
return
|
|
202
|
+
NumberFormat.__defaultLocale = '';
|
|
203
|
+
NumberFormat.localeData = {};
|
|
204
|
+
NumberFormat.availableLocales = new Set();
|
|
205
|
+
NumberFormat.getDefaultLocale = function () {
|
|
206
|
+
return NumberFormat.__defaultLocale;
|
|
211
207
|
};
|
|
212
|
-
|
|
208
|
+
NumberFormat.polyfilled = true;
|
|
213
209
|
function toNumeric(val) {
|
|
214
210
|
if (typeof val === 'bigint') {
|
|
215
211
|
return val;
|
|
216
212
|
}
|
|
217
|
-
return
|
|
213
|
+
return ToNumber(val);
|
|
218
214
|
}
|
|
219
215
|
try {
|
|
220
216
|
// IE11 does not have Symbol
|
|
221
217
|
if (typeof Symbol !== 'undefined') {
|
|
222
|
-
Object.defineProperty(
|
|
218
|
+
Object.defineProperty(NumberFormat.prototype, Symbol.toStringTag, {
|
|
223
219
|
configurable: true,
|
|
224
220
|
enumerable: false,
|
|
225
221
|
writable: false,
|
|
@@ -227,24 +223,24 @@ try {
|
|
|
227
223
|
});
|
|
228
224
|
}
|
|
229
225
|
// https://github.com/tc39/test262/blob/master/test/intl402/NumberFormat/length.js
|
|
230
|
-
Object.defineProperty(
|
|
226
|
+
Object.defineProperty(NumberFormat.prototype.constructor, 'length', {
|
|
231
227
|
configurable: true,
|
|
232
228
|
enumerable: false,
|
|
233
229
|
writable: false,
|
|
234
230
|
value: 0,
|
|
235
231
|
});
|
|
236
232
|
// https://github.com/tc39/test262/blob/master/test/intl402/NumberFormat/supportedLocalesOf/length.js
|
|
237
|
-
Object.defineProperty(
|
|
233
|
+
Object.defineProperty(NumberFormat.supportedLocalesOf, 'length', {
|
|
238
234
|
configurable: true,
|
|
239
235
|
enumerable: false,
|
|
240
236
|
writable: false,
|
|
241
237
|
value: 1,
|
|
242
238
|
});
|
|
243
|
-
Object.defineProperty(
|
|
239
|
+
Object.defineProperty(NumberFormat, 'prototype', {
|
|
244
240
|
configurable: false,
|
|
245
241
|
enumerable: false,
|
|
246
242
|
writable: false,
|
|
247
|
-
value:
|
|
243
|
+
value: NumberFormat.prototype,
|
|
248
244
|
});
|
|
249
245
|
}
|
|
250
246
|
catch (e) {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Type-only circular import
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
2
|
var internalSlotMap = new WeakMap();
|
|
5
|
-
function getInternalSlots(x) {
|
|
3
|
+
export default function getInternalSlots(x) {
|
|
6
4
|
var internalSlots = internalSlotMap.get(x);
|
|
7
5
|
if (!internalSlots) {
|
|
8
6
|
internalSlots = Object.create(null);
|
|
@@ -10,4 +8,3 @@ function getInternalSlots(x) {
|
|
|
10
8
|
}
|
|
11
9
|
return internalSlots;
|
|
12
10
|
}
|
|
13
|
-
exports.default = getInternalSlots;
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.numberingSystemNames = void 0;
|
|
4
|
-
exports.numberingSystemNames = ["adlm", "ahom", "arab", "arabext", "armn", "armnlow", "bali", "beng", "bhks", "brah", "cakm", "cham", "cyrl", "deva", "diak", "ethi", "fullwide", "geor", "gong", "gonm", "grek", "greklow", "gujr", "guru", "hanidays", "hanidec", "hans", "hansfin", "hant", "hantfin", "hebr", "hmng", "hmnp", "java", "jpan", "jpanfin", "jpanyear", "kali", "kawi", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb", "mathbold", "mathdbl", "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", "nagm", "newa", "nkoo", "olck", "orya", "osma", "rohg", "roman", "romanlow", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", "takr", "talu", "taml", "tamldec", "telu", "thai", "tibt", "tirh", "tnsa", "vaii", "wara", "wcho"];
|
|
1
|
+
export var numberingSystemNames = ["adlm", "ahom", "arab", "arabext", "armn", "armnlow", "bali", "beng", "bhks", "brah", "cakm", "cham", "cyrl", "deva", "diak", "ethi", "fullwide", "geor", "gong", "gonm", "grek", "greklow", "gujr", "guru", "hanidays", "hanidec", "hans", "hansfin", "hant", "hantfin", "hebr", "hmng", "hmnp", "java", "jpan", "jpanfin", "jpanyear", "kali", "kawi", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb", "mathbold", "mathdbl", "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", "nagm", "newa", "nkoo", "olck", "orya", "osma", "rohg", "roman", "romanlow", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", "takr", "talu", "taml", "tamldec", "telu", "thai", "tibt", "tirh", "tnsa", "vaii", "wara", "wcho"];
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toLocaleString = void 0;
|
|
4
1
|
// eslint-disable-next-line import/no-cycle
|
|
5
|
-
|
|
2
|
+
import { NumberFormat } from './core';
|
|
6
3
|
/**
|
|
7
4
|
* Number.prototype.toLocaleString ponyfill
|
|
8
5
|
* https://tc39.es/ecma402/#sup-number.prototype.tolocalestring
|
|
9
6
|
*/
|
|
10
|
-
function toLocaleString(x, locales, options) {
|
|
11
|
-
var numberFormat = new
|
|
7
|
+
export function toLocaleString(x, locales, options) {
|
|
8
|
+
var numberFormat = new NumberFormat(locales, options);
|
|
12
9
|
return numberFormat.format(x);
|
|
13
10
|
}
|
|
14
|
-
exports.toLocaleString = toLocaleString;
|
package/lib/src/types.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.supportedLocales = void 0;
|
|
4
|
-
exports.supportedLocales = ["af", "af-NA", "agq", "ak", "am", "ar", "ar-AE", "ar-BH", "ar-DJ", "ar-DZ", "ar-EG", "ar-EH", "ar-ER", "ar-IL", "ar-IQ", "ar-JO", "ar-KM", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-MR", "ar-OM", "ar-PS", "ar-QA", "ar-SA", "ar-SD", "ar-SO", "ar-SS", "ar-SY", "ar-TD", "ar-TN", "ar-YE", "as", "asa", "ast", "az", "az-Cyrl", "az-Latn", "bas", "be", "be-tarask", "bem", "bez", "bg", "bm", "bn", "bn-IN", "bo", "bo-IN", "br", "brx", "bs", "bs-Cyrl", "bs-Latn", "ca", "ca-AD", "ca-ES-valencia", "ca-FR", "ca-IT", "ccp", "ccp-IN", "ce", "ceb", "cgg", "chr", "ckb", "ckb-IR", "cs", "cy", "da", "da-GL", "dav", "de", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee", "ee-TG", "el", "el-CY", "en", "en-001", "en-150", "en-AE", "en-AG", "en-AI", "en-AS", "en-AT", "en-AU", "en-BB", "en-BE", "en-BI", "en-BM", "en-BS", "en-BW", "en-BZ", "en-CA", "en-CC", "en-CH", "en-CK", "en-CM", "en-CX", "en-CY", "en-DE", "en-DG", "en-DK", "en-DM", "en-ER", "en-FI", "en-FJ", "en-FK", "en-FM", "en-GB", "en-GD", "en-GG", "en-GH", "en-GI", "en-GM", "en-GU", "en-GY", "en-HK", "en-IE", "en-IL", "en-IM", "en-IN", "en-IO", "en-JE", "en-JM", "en-KE", "en-KI", "en-KN", "en-KY", "en-LC", "en-LR", "en-LS", "en-MG", "en-MH", "en-MO", "en-MP", "en-MS", "en-MT", "en-MU", "en-MW", "en-MY", "en-NA", "en-NF", "en-NG", "en-NL", "en-NR", "en-NU", "en-NZ", "en-PG", "en-PH", "en-PK", "en-PN", "en-PR", "en-PW", "en-RW", "en-SB", "en-SC", "en-SD", "en-SE", "en-SG", "en-SH", "en-SI", "en-SL", "en-SS", "en-SX", "en-SZ", "en-TC", "en-TK", "en-TO", "en-TT", "en-TV", "en-TZ", "en-UG", "en-UM", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "eo", "es", "es-419", "es-AR", "es-BO", "es-BR", "es-BZ", "es-CL", "es-CO", "es-CR", "es-CU", "es-DO", "es-EA", "es-EC", "es-GQ", "es-GT", "es-HN", "es-IC", "es-MX", "es-NI", "es-PA", "es-PE", "es-PH", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et", "eu", "ewo", "fa", "fa-AF", "ff", "ff-Adlm", "ff-Adlm-BF", "ff-Adlm-CM", "ff-Adlm-GH", "ff-Adlm-GM", "ff-Adlm-GW", "ff-Adlm-LR", "ff-Adlm-MR", "ff-Adlm-NE", "ff-Adlm-NG", "ff-Adlm-SL", "ff-Adlm-SN", "ff-Latn", "ff-Latn-BF", "ff-Latn-CM", "ff-Latn-GH", "ff-Latn-GM", "ff-Latn-GN", "ff-Latn-GW", "ff-Latn-LR", "ff-Latn-MR", "ff-Latn-NE", "ff-Latn-NG", "ff-Latn-SL", "fi", "fil", "fo", "fo-DK", "fr", "fr-BE", "fr-BF", "fr-BI", "fr-BJ", "fr-BL", "fr-CA", "fr-CD", "fr-CF", "fr-CG", "fr-CH", "fr-CI", "fr-CM", "fr-DJ", "fr-DZ", "fr-GA", "fr-GF", "fr-GN", "fr-GP", "fr-GQ", "fr-HT", "fr-KM", "fr-LU", "fr-MA", "fr-MC", "fr-MF", "fr-MG", "fr-ML", "fr-MQ", "fr-MR", "fr-MU", "fr-NC", "fr-NE", "fr-PF", "fr-PM", "fr-RE", "fr-RW", "fr-SC", "fr-SN", "fr-SY", "fr-TD", "fr-TG", "fr-TN", "fr-VU", "fr-WF", "fr-YT", "fur", "fy", "ga", "ga-GB", "gd", "gl", "gsw", "gsw-FR", "gsw-LI", "gu", "guz", "gv", "ha", "ha-GH", "ha-NE", "haw", "he", "hi", "hr", "hr-BA", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it", "it-CH", "it-SM", "it-VA", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "ko-KP", "kok", "ks", "ks-Arab", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln", "ln-AO", "ln-CF", "ln-CG", "lo", "lrc", "lrc-IQ", "lt", "lu", "luo", "luy", "lv", "mai", "mas", "mas-TZ", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni", "mni-Beng", "mr", "ms", "ms-BN", "ms-ID", "ms-SG", "mt", "mua", "my", "mzn", "naq", "nb", "nb-SJ", "nd", "nds", "nds-NL", "ne", "ne-IN", "nl", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nmg", "nn", "nnh", "no", "nus", "nyn", "om", "om-KE", "or", "os", "os-RU", "pa", "pa-Arab", "pa-Guru", "pcm", "pl", "ps", "ps-PK", "pt", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "qu", "qu-BO", "qu-EC", "rm", "rn", "ro", "ro-MD", "rof", "ru", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "rw", "rwk", "sa", "sah", "saq", "sat", "sat-Olck", "sbp", "sc", "sd", "sd-Arab", "sd-Deva", "se", "se-FI", "se-SE", "seh", "ses", "sg", "shi", "shi-Latn", "shi-Tfng", "si", "sk", "sl", "smn", "sn", "so", "so-DJ", "so-ET", "so-KE", "sq", "sq-MK", "sq-XK", "sr", "sr-Cyrl", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Latn", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "su", "su-Latn", "sv", "sv-AX", "sv-FI", "sw", "sw-CD", "sw-KE", "sw-UG", "ta", "ta-LK", "ta-MY", "ta-SG", "te", "teo", "teo-KE", "tg", "th", "ti", "ti-ER", "tk", "to", "tr", "tr-CY", "tt", "twq", "tzm", "ug", "uk", "und", "ur", "ur-IN", "uz", "uz-Arab", "uz-Cyrl", "uz-Latn", "vai", "vai-Latn", "vai-Vaii", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo", "yo-BJ", "yrl", "yrl-CO", "yrl-VE", "yue", "yue-Hans", "yue-Hant", "zgh", "zh", "zh-Hans", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hant", "zh-Hant-HK", "zh-Hant-MO", "zu"];
|
|
1
|
+
export var supportedLocales = ["af", "af-NA", "agq", "ak", "am", "ar", "ar-AE", "ar-BH", "ar-DJ", "ar-DZ", "ar-EG", "ar-EH", "ar-ER", "ar-IL", "ar-IQ", "ar-JO", "ar-KM", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-MR", "ar-OM", "ar-PS", "ar-QA", "ar-SA", "ar-SD", "ar-SO", "ar-SS", "ar-SY", "ar-TD", "ar-TN", "ar-YE", "as", "asa", "ast", "az", "az-Cyrl", "az-Latn", "bas", "be", "be-tarask", "bem", "bez", "bg", "bm", "bn", "bn-IN", "bo", "bo-IN", "br", "brx", "bs", "bs-Cyrl", "bs-Latn", "ca", "ca-AD", "ca-ES-valencia", "ca-FR", "ca-IT", "ccp", "ccp-IN", "ce", "ceb", "cgg", "chr", "ckb", "ckb-IR", "cs", "cy", "da", "da-GL", "dav", "de", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee", "ee-TG", "el", "el-CY", "en", "en-001", "en-150", "en-AE", "en-AG", "en-AI", "en-AS", "en-AT", "en-AU", "en-BB", "en-BE", "en-BI", "en-BM", "en-BS", "en-BW", "en-BZ", "en-CA", "en-CC", "en-CH", "en-CK", "en-CM", "en-CX", "en-CY", "en-DE", "en-DG", "en-DK", "en-DM", "en-ER", "en-FI", "en-FJ", "en-FK", "en-FM", "en-GB", "en-GD", "en-GG", "en-GH", "en-GI", "en-GM", "en-GU", "en-GY", "en-HK", "en-IE", "en-IL", "en-IM", "en-IN", "en-IO", "en-JE", "en-JM", "en-KE", "en-KI", "en-KN", "en-KY", "en-LC", "en-LR", "en-LS", "en-MG", "en-MH", "en-MO", "en-MP", "en-MS", "en-MT", "en-MU", "en-MW", "en-MY", "en-NA", "en-NF", "en-NG", "en-NL", "en-NR", "en-NU", "en-NZ", "en-PG", "en-PH", "en-PK", "en-PN", "en-PR", "en-PW", "en-RW", "en-SB", "en-SC", "en-SD", "en-SE", "en-SG", "en-SH", "en-SI", "en-SL", "en-SS", "en-SX", "en-SZ", "en-TC", "en-TK", "en-TO", "en-TT", "en-TV", "en-TZ", "en-UG", "en-UM", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "eo", "es", "es-419", "es-AR", "es-BO", "es-BR", "es-BZ", "es-CL", "es-CO", "es-CR", "es-CU", "es-DO", "es-EA", "es-EC", "es-GQ", "es-GT", "es-HN", "es-IC", "es-MX", "es-NI", "es-PA", "es-PE", "es-PH", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et", "eu", "ewo", "fa", "fa-AF", "ff", "ff-Adlm", "ff-Adlm-BF", "ff-Adlm-CM", "ff-Adlm-GH", "ff-Adlm-GM", "ff-Adlm-GW", "ff-Adlm-LR", "ff-Adlm-MR", "ff-Adlm-NE", "ff-Adlm-NG", "ff-Adlm-SL", "ff-Adlm-SN", "ff-Latn", "ff-Latn-BF", "ff-Latn-CM", "ff-Latn-GH", "ff-Latn-GM", "ff-Latn-GN", "ff-Latn-GW", "ff-Latn-LR", "ff-Latn-MR", "ff-Latn-NE", "ff-Latn-NG", "ff-Latn-SL", "fi", "fil", "fo", "fo-DK", "fr", "fr-BE", "fr-BF", "fr-BI", "fr-BJ", "fr-BL", "fr-CA", "fr-CD", "fr-CF", "fr-CG", "fr-CH", "fr-CI", "fr-CM", "fr-DJ", "fr-DZ", "fr-GA", "fr-GF", "fr-GN", "fr-GP", "fr-GQ", "fr-HT", "fr-KM", "fr-LU", "fr-MA", "fr-MC", "fr-MF", "fr-MG", "fr-ML", "fr-MQ", "fr-MR", "fr-MU", "fr-NC", "fr-NE", "fr-PF", "fr-PM", "fr-RE", "fr-RW", "fr-SC", "fr-SN", "fr-SY", "fr-TD", "fr-TG", "fr-TN", "fr-VU", "fr-WF", "fr-YT", "fur", "fy", "ga", "ga-GB", "gd", "gl", "gsw", "gsw-FR", "gsw-LI", "gu", "guz", "gv", "ha", "ha-GH", "ha-NE", "haw", "he", "hi", "hr", "hr-BA", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it", "it-CH", "it-SM", "it-VA", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "ko-KP", "kok", "ks", "ks-Arab", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln", "ln-AO", "ln-CF", "ln-CG", "lo", "lrc", "lrc-IQ", "lt", "lu", "luo", "luy", "lv", "mai", "mas", "mas-TZ", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni", "mni-Beng", "mr", "ms", "ms-BN", "ms-ID", "ms-SG", "mt", "mua", "my", "mzn", "naq", "nb", "nb-SJ", "nd", "nds", "nds-NL", "ne", "ne-IN", "nl", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nmg", "nn", "nnh", "no", "nus", "nyn", "om", "om-KE", "or", "os", "os-RU", "pa", "pa-Arab", "pa-Guru", "pcm", "pl", "ps", "ps-PK", "pt", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "qu", "qu-BO", "qu-EC", "rm", "rn", "ro", "ro-MD", "rof", "ru", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "rw", "rwk", "sa", "sah", "saq", "sat", "sat-Olck", "sbp", "sc", "sd", "sd-Arab", "sd-Deva", "se", "se-FI", "se-SE", "seh", "ses", "sg", "shi", "shi-Latn", "shi-Tfng", "si", "sk", "sl", "smn", "sn", "so", "so-DJ", "so-ET", "so-KE", "sq", "sq-MK", "sq-XK", "sr", "sr-Cyrl", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Latn", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "su", "su-Latn", "sv", "sv-AX", "sv-FI", "sw", "sw-CD", "sw-KE", "sw-UG", "ta", "ta-LK", "ta-MY", "ta-SG", "te", "teo", "teo-KE", "tg", "th", "ti", "ti-ER", "tk", "to", "tr", "tr-CY", "tt", "twq", "tzm", "ug", "uk", "und", "ur", "ur-IN", "uz", "uz-Arab", "uz-Cyrl", "uz-Latn", "vai", "vai-Latn", "vai-Vaii", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo", "yo-BJ", "yrl", "yrl-CO", "yrl-VE", "yue", "yue-Hans", "yue-Hant", "zgh", "zh", "zh-Hans", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hant", "zh-Hant-HK", "zh-Hant-MO", "zu"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-numberformat",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.9.0",
|
|
4
4
|
"description": "Ponyfill for ES2020 Intl.NumberFormat",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"polyfill",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"tslib": "^2.4.0",
|
|
26
|
-
"@formatjs/
|
|
27
|
-
"@formatjs/
|
|
26
|
+
"@formatjs/intl-localematcher": "0.5.2",
|
|
27
|
+
"@formatjs/ecma402-abstract": "1.18.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@formatjs/intl-
|
|
31
|
-
"@formatjs/intl-locale": "3.4.
|
|
32
|
-
"@formatjs/intl-
|
|
30
|
+
"@formatjs/intl-pluralrules": "5.2.10",
|
|
31
|
+
"@formatjs/intl-locale": "3.4.3",
|
|
32
|
+
"@formatjs/intl-getcanonicallocales": "2.3.0"
|
|
33
33
|
},
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/formatjs/formatjs/issues"
|