@formatjs/intl-pluralrules 5.4.2 → 5.4.4
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 +21 -26
- package/polyfill.iife.js +36 -24
package/package.json
CHANGED
|
@@ -1,36 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-pluralrules",
|
|
3
|
-
"version": "5.4.2",
|
|
4
3
|
"description": "Polyfill for Intl.PluralRules",
|
|
5
|
-
"
|
|
6
|
-
"polyfill",
|
|
7
|
-
"i18n",
|
|
8
|
-
"intl",
|
|
9
|
-
"plural",
|
|
10
|
-
"rules",
|
|
11
|
-
"PluralRules"
|
|
12
|
-
],
|
|
13
|
-
"author": "Long Ho <holevietlong@gmail.com>",
|
|
14
|
-
"homepage": "https://github.com/formatjs/formatjs",
|
|
4
|
+
"version": "5.4.4",
|
|
15
5
|
"license": "MIT",
|
|
16
|
-
"
|
|
6
|
+
"author": "Long Ho <holevietlong@gmail.com>",
|
|
17
7
|
"types": "index.d.ts",
|
|
18
|
-
"repository": {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/formatjs/formatjs.git"
|
|
21
|
-
},
|
|
22
8
|
"dependencies": {
|
|
23
|
-
"decimal.js": "10",
|
|
24
|
-
"tslib": "2",
|
|
25
|
-
"@formatjs/ecma402-abstract": "2.3.
|
|
26
|
-
"@formatjs/intl-localematcher": "0.
|
|
9
|
+
"decimal.js": "^10.4.3",
|
|
10
|
+
"tslib": "^2.8.0",
|
|
11
|
+
"@formatjs/ecma402-abstract": "2.3.4",
|
|
12
|
+
"@formatjs/intl-localematcher": "0.6.1"
|
|
27
13
|
},
|
|
28
14
|
"devDependencies": {
|
|
29
|
-
"@formatjs/intl-getcanonicallocales": "2.5.
|
|
30
|
-
"@formatjs/intl-locale": "4.2.
|
|
31
|
-
},
|
|
32
|
-
"bugs": {
|
|
33
|
-
"url": "https://github.com/formatjs/formatjs/issues"
|
|
15
|
+
"@formatjs/intl-getcanonicallocales": "2.5.5",
|
|
16
|
+
"@formatjs/intl-locale": "4.2.11"
|
|
34
17
|
},
|
|
35
|
-
"
|
|
18
|
+
"bugs": "https://github.com/formatjs/formatjs/issues",
|
|
19
|
+
"gitHead": "a7842673d8ad205171ad7c8cb8bb2f318b427c0c",
|
|
20
|
+
"homepage": "https://github.com/formatjs/formatjs",
|
|
21
|
+
"keywords": [
|
|
22
|
+
"i18n",
|
|
23
|
+
"intl",
|
|
24
|
+
"plural",
|
|
25
|
+
"PluralRules",
|
|
26
|
+
"polyfill",
|
|
27
|
+
"rules"
|
|
28
|
+
],
|
|
29
|
+
"main": "index.js",
|
|
30
|
+
"repository": "formatjs/formatjs.git"
|
|
36
31
|
}
|
package/polyfill.iife.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
return Intl.getCanonicalLocales(locales);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
// node_modules/.aspect_rules_js/decimal.js@10.
|
|
14
|
+
// node_modules/.aspect_rules_js/decimal.js@10.5.0/node_modules/decimal.js/decimal.mjs
|
|
15
15
|
var EXP_LIMIT = 9e15;
|
|
16
16
|
var MAX_DIGITS = 1e9;
|
|
17
17
|
var NUMERALS = "0123456789abcdef";
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);
|
|
304
304
|
};
|
|
305
305
|
P.inverseCosine = P.acos = function() {
|
|
306
|
-
var
|
|
306
|
+
var x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
|
|
307
307
|
if (k !== -1) {
|
|
308
308
|
return k === 0 ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) : new Ctor(NaN);
|
|
309
309
|
}
|
|
@@ -311,11 +311,10 @@
|
|
|
311
311
|
return getPi(Ctor, pr + 4, rm).times(0.5);
|
|
312
312
|
Ctor.precision = pr + 6;
|
|
313
313
|
Ctor.rounding = 1;
|
|
314
|
-
x = x.
|
|
315
|
-
halfPi = getPi(Ctor, pr + 4, rm).times(0.5);
|
|
314
|
+
x = new Ctor(1).minus(x).div(x.plus(1)).sqrt().atan();
|
|
316
315
|
Ctor.precision = pr;
|
|
317
316
|
Ctor.rounding = rm;
|
|
318
|
-
return
|
|
317
|
+
return x.times(2);
|
|
319
318
|
};
|
|
320
319
|
P.inverseHyperbolicCosine = P.acosh = function() {
|
|
321
320
|
var pr, rm, x = this, Ctor = x.constructor;
|
|
@@ -1527,14 +1526,16 @@
|
|
|
1527
1526
|
function isOdd(n) {
|
|
1528
1527
|
return n.d[n.d.length - 1] & 1;
|
|
1529
1528
|
}
|
|
1530
|
-
function maxOrMin(Ctor, args,
|
|
1531
|
-
var y, x = new Ctor(args[0]), i = 0;
|
|
1529
|
+
function maxOrMin(Ctor, args, n) {
|
|
1530
|
+
var k, y, x = new Ctor(args[0]), i = 0;
|
|
1532
1531
|
for (; ++i < args.length; ) {
|
|
1533
1532
|
y = new Ctor(args[i]);
|
|
1534
1533
|
if (!y.s) {
|
|
1535
1534
|
x = y;
|
|
1536
1535
|
break;
|
|
1537
|
-
}
|
|
1536
|
+
}
|
|
1537
|
+
k = x.cmp(y);
|
|
1538
|
+
if (k === n || k === 0 && x.s === n) {
|
|
1538
1539
|
x = y;
|
|
1539
1540
|
}
|
|
1540
1541
|
}
|
|
@@ -2116,7 +2117,8 @@
|
|
|
2116
2117
|
x.d = [v];
|
|
2117
2118
|
}
|
|
2118
2119
|
return;
|
|
2119
|
-
}
|
|
2120
|
+
}
|
|
2121
|
+
if (v * 0 !== 0) {
|
|
2120
2122
|
if (!v)
|
|
2121
2123
|
x.s = NaN;
|
|
2122
2124
|
x.e = NaN;
|
|
@@ -2124,18 +2126,28 @@
|
|
|
2124
2126
|
return;
|
|
2125
2127
|
}
|
|
2126
2128
|
return parseDecimal(x, v.toString());
|
|
2127
|
-
} else if (t !== "string") {
|
|
2128
|
-
throw Error(invalidArgument + v);
|
|
2129
2129
|
}
|
|
2130
|
-
if (
|
|
2131
|
-
|
|
2132
|
-
x.s = -1;
|
|
2133
|
-
} else {
|
|
2134
|
-
if (i2 === 43)
|
|
2130
|
+
if (t === "string") {
|
|
2131
|
+
if ((i2 = v.charCodeAt(0)) === 45) {
|
|
2135
2132
|
v = v.slice(1);
|
|
2136
|
-
|
|
2133
|
+
x.s = -1;
|
|
2134
|
+
} else {
|
|
2135
|
+
if (i2 === 43)
|
|
2136
|
+
v = v.slice(1);
|
|
2137
|
+
x.s = 1;
|
|
2138
|
+
}
|
|
2139
|
+
return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);
|
|
2137
2140
|
}
|
|
2138
|
-
|
|
2141
|
+
if (t === "bigint") {
|
|
2142
|
+
if (v < 0) {
|
|
2143
|
+
v = -v;
|
|
2144
|
+
x.s = -1;
|
|
2145
|
+
} else {
|
|
2146
|
+
x.s = 1;
|
|
2147
|
+
}
|
|
2148
|
+
return parseDecimal(x, v.toString());
|
|
2149
|
+
}
|
|
2150
|
+
throw Error(invalidArgument + v);
|
|
2139
2151
|
}
|
|
2140
2152
|
Decimal2.prototype = P;
|
|
2141
2153
|
Decimal2.ROUND_UP = 0;
|
|
@@ -2245,10 +2257,10 @@
|
|
|
2245
2257
|
return new this(x).log(10);
|
|
2246
2258
|
}
|
|
2247
2259
|
function max() {
|
|
2248
|
-
return maxOrMin(this, arguments,
|
|
2260
|
+
return maxOrMin(this, arguments, -1);
|
|
2249
2261
|
}
|
|
2250
2262
|
function min() {
|
|
2251
|
-
return maxOrMin(this, arguments,
|
|
2263
|
+
return maxOrMin(this, arguments, 1);
|
|
2252
2264
|
}
|
|
2253
2265
|
function mod(x, y) {
|
|
2254
2266
|
return new this(x).mod(y);
|
|
@@ -7097,7 +7109,7 @@
|
|
|
7097
7109
|
}).reduce(function(all, list) {
|
|
7098
7110
|
return __spreadArray(__spreadArray([], all, true), list, true);
|
|
7099
7111
|
}, []);
|
|
7100
|
-
matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > 1 != shouldInclude));
|
|
7112
|
+
matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > -1 != shouldInclude));
|
|
7101
7113
|
} else {
|
|
7102
7114
|
matches && (matches = locale.region ? region === "*" || region === locale.region : true);
|
|
7103
7115
|
}
|
|
@@ -7158,7 +7170,7 @@
|
|
|
7158
7170
|
region: ""
|
|
7159
7171
|
}, {
|
|
7160
7172
|
language: supportedLocale.language,
|
|
7161
|
-
script:
|
|
7173
|
+
script: supportedLSR.script,
|
|
7162
7174
|
region: ""
|
|
7163
7175
|
}, data2);
|
|
7164
7176
|
}
|
|
@@ -7873,10 +7885,10 @@
|
|
|
7873
7885
|
|
|
7874
7886
|
decimal.js/decimal.mjs:
|
|
7875
7887
|
(*!
|
|
7876
|
-
* decimal.js v10.
|
|
7888
|
+
* decimal.js v10.5.0
|
|
7877
7889
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
7878
7890
|
* https://github.com/MikeMcl/decimal.js
|
|
7879
|
-
* Copyright (c)
|
|
7891
|
+
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
7880
7892
|
* MIT Licence
|
|
7881
7893
|
*)
|
|
7882
7894
|
*/
|