@formatjs/intl-numberformat 8.15.3 → 8.15.5
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 +22 -27
- package/polyfill.iife.js +34 -22
package/package.json
CHANGED
|
@@ -1,39 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-numberformat",
|
|
3
|
-
"version": "8.15.3",
|
|
4
3
|
"description": "Ponyfill for ES2020 Intl.NumberFormat",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"i18n",
|
|
8
|
-
"numberformat",
|
|
9
|
-
"intl",
|
|
10
|
-
"Intl.NumberFormat"
|
|
11
|
-
],
|
|
4
|
+
"version": "8.15.5",
|
|
5
|
+
"bugs": "https://github.com/formatjs/formatjs/issues",
|
|
12
6
|
"contributors": [
|
|
13
7
|
"Linjie Ding <linjie@airtable.com>",
|
|
14
8
|
"Long Ho <holevietlong@gmail.com>"
|
|
15
9
|
],
|
|
16
|
-
"homepage": "https://github.com/formatjs/formatjs",
|
|
17
|
-
"license": "MIT",
|
|
18
|
-
"main": "index.js",
|
|
19
|
-
"types": "index.d.ts",
|
|
20
|
-
"repository": {
|
|
21
|
-
"type": "git",
|
|
22
|
-
"url": "git+https://github.com/formatjs/formatjs.git"
|
|
23
|
-
},
|
|
24
10
|
"dependencies": {
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
11
|
+
"@formatjs/ecma402-abstract": "2.3.5",
|
|
12
|
+
"@formatjs/intl-localematcher": "0.6.2",
|
|
13
|
+
"decimal.js": "^10.4.3",
|
|
14
|
+
"tslib": "^2.8.0"
|
|
29
15
|
},
|
|
30
16
|
"devDependencies": {
|
|
31
|
-
"@formatjs/intl-
|
|
32
|
-
"@formatjs/intl-
|
|
33
|
-
"@formatjs/intl-
|
|
17
|
+
"@formatjs/intl-getcanonicallocales": "2.5.6",
|
|
18
|
+
"@formatjs/intl-locale": "4.2.12",
|
|
19
|
+
"@formatjs/intl-pluralrules": "5.4.5"
|
|
34
20
|
},
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
21
|
+
"gitHead": "a7842673d8ad205171ad7c8cb8bb2f318b427c0c",
|
|
22
|
+
"homepage": "https://github.com/formatjs/formatjs",
|
|
23
|
+
"keywords": [
|
|
24
|
+
"i18n",
|
|
25
|
+
"intl",
|
|
26
|
+
"Intl.NumberFormat",
|
|
27
|
+
"numberformat",
|
|
28
|
+
"polyfill"
|
|
29
|
+
],
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"main": "index.js",
|
|
32
|
+
"repository": "formatjs/formatjs.git",
|
|
33
|
+
"types": "index.d.ts"
|
|
39
34
|
}
|
package/polyfill.iife.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
return Intl.getCanonicalLocales(locales);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
// node_modules/.aspect_rules_js/decimal.js@10.
|
|
7
|
+
// node_modules/.aspect_rules_js/decimal.js@10.6.0/node_modules/decimal.js/decimal.mjs
|
|
8
8
|
var EXP_LIMIT = 9e15;
|
|
9
9
|
var MAX_DIGITS = 1e9;
|
|
10
10
|
var NUMERALS = "0123456789abcdef";
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);
|
|
297
297
|
};
|
|
298
298
|
P.inverseCosine = P.acos = function() {
|
|
299
|
-
var
|
|
299
|
+
var x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
|
|
300
300
|
if (k !== -1) {
|
|
301
301
|
return k === 0 ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) : new Ctor(NaN);
|
|
302
302
|
}
|
|
@@ -304,11 +304,10 @@
|
|
|
304
304
|
return getPi(Ctor, pr + 4, rm).times(0.5);
|
|
305
305
|
Ctor.precision = pr + 6;
|
|
306
306
|
Ctor.rounding = 1;
|
|
307
|
-
x = x.
|
|
308
|
-
halfPi = getPi(Ctor, pr + 4, rm).times(0.5);
|
|
307
|
+
x = new Ctor(1).minus(x).div(x.plus(1)).sqrt().atan();
|
|
309
308
|
Ctor.precision = pr;
|
|
310
309
|
Ctor.rounding = rm;
|
|
311
|
-
return
|
|
310
|
+
return x.times(2);
|
|
312
311
|
};
|
|
313
312
|
P.inverseHyperbolicCosine = P.acosh = function() {
|
|
314
313
|
var pr, rm, x = this, Ctor = x.constructor;
|
|
@@ -1520,14 +1519,16 @@
|
|
|
1520
1519
|
function isOdd(n) {
|
|
1521
1520
|
return n.d[n.d.length - 1] & 1;
|
|
1522
1521
|
}
|
|
1523
|
-
function maxOrMin(Ctor, args,
|
|
1524
|
-
var y, x = new Ctor(args[0]), i = 0;
|
|
1522
|
+
function maxOrMin(Ctor, args, n) {
|
|
1523
|
+
var k, y, x = new Ctor(args[0]), i = 0;
|
|
1525
1524
|
for (; ++i < args.length; ) {
|
|
1526
1525
|
y = new Ctor(args[i]);
|
|
1527
1526
|
if (!y.s) {
|
|
1528
1527
|
x = y;
|
|
1529
1528
|
break;
|
|
1530
|
-
}
|
|
1529
|
+
}
|
|
1530
|
+
k = x.cmp(y);
|
|
1531
|
+
if (k === n || k === 0 && x.s === n) {
|
|
1531
1532
|
x = y;
|
|
1532
1533
|
}
|
|
1533
1534
|
}
|
|
@@ -2109,7 +2110,8 @@
|
|
|
2109
2110
|
x.d = [v];
|
|
2110
2111
|
}
|
|
2111
2112
|
return;
|
|
2112
|
-
}
|
|
2113
|
+
}
|
|
2114
|
+
if (v * 0 !== 0) {
|
|
2113
2115
|
if (!v)
|
|
2114
2116
|
x.s = NaN;
|
|
2115
2117
|
x.e = NaN;
|
|
@@ -2117,18 +2119,28 @@
|
|
|
2117
2119
|
return;
|
|
2118
2120
|
}
|
|
2119
2121
|
return parseDecimal(x, v.toString());
|
|
2120
|
-
} else if (t !== "string") {
|
|
2121
|
-
throw Error(invalidArgument + v);
|
|
2122
2122
|
}
|
|
2123
|
-
if (
|
|
2124
|
-
|
|
2125
|
-
x.s = -1;
|
|
2126
|
-
} else {
|
|
2127
|
-
if (i2 === 43)
|
|
2123
|
+
if (t === "string") {
|
|
2124
|
+
if ((i2 = v.charCodeAt(0)) === 45) {
|
|
2128
2125
|
v = v.slice(1);
|
|
2129
|
-
|
|
2126
|
+
x.s = -1;
|
|
2127
|
+
} else {
|
|
2128
|
+
if (i2 === 43)
|
|
2129
|
+
v = v.slice(1);
|
|
2130
|
+
x.s = 1;
|
|
2131
|
+
}
|
|
2132
|
+
return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);
|
|
2133
|
+
}
|
|
2134
|
+
if (t === "bigint") {
|
|
2135
|
+
if (v < 0) {
|
|
2136
|
+
v = -v;
|
|
2137
|
+
x.s = -1;
|
|
2138
|
+
} else {
|
|
2139
|
+
x.s = 1;
|
|
2140
|
+
}
|
|
2141
|
+
return parseDecimal(x, v.toString());
|
|
2130
2142
|
}
|
|
2131
|
-
|
|
2143
|
+
throw Error(invalidArgument + v);
|
|
2132
2144
|
}
|
|
2133
2145
|
Decimal2.prototype = P;
|
|
2134
2146
|
Decimal2.ROUND_UP = 0;
|
|
@@ -2238,10 +2250,10 @@
|
|
|
2238
2250
|
return new this(x).log(10);
|
|
2239
2251
|
}
|
|
2240
2252
|
function max() {
|
|
2241
|
-
return maxOrMin(this, arguments,
|
|
2253
|
+
return maxOrMin(this, arguments, -1);
|
|
2242
2254
|
}
|
|
2243
2255
|
function min() {
|
|
2244
|
-
return maxOrMin(this, arguments,
|
|
2256
|
+
return maxOrMin(this, arguments, 1);
|
|
2245
2257
|
}
|
|
2246
2258
|
function mod(x, y) {
|
|
2247
2259
|
return new this(x).mod(y);
|
|
@@ -9515,10 +9527,10 @@ Please __addLocaleData before adding additional unit data`);
|
|
|
9515
9527
|
|
|
9516
9528
|
decimal.js/decimal.mjs:
|
|
9517
9529
|
(*!
|
|
9518
|
-
* decimal.js v10.
|
|
9530
|
+
* decimal.js v10.6.0
|
|
9519
9531
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
9520
9532
|
* https://github.com/MikeMcl/decimal.js
|
|
9521
|
-
* Copyright (c)
|
|
9533
|
+
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
9522
9534
|
* MIT Licence
|
|
9523
9535
|
*)
|
|
9524
9536
|
*/
|