@formatjs/intl-segmenter 11.7.9 → 11.7.10
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 +15 -20
- package/polyfill.iife.js +34 -22
package/package.json
CHANGED
|
@@ -1,30 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-segmenter",
|
|
3
|
-
"version": "11.7.9",
|
|
4
3
|
"description": "Polyfill for Intl.Segmenter",
|
|
4
|
+
"version": "11.7.10",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Matija Gaspar <matijagaspar@gmail.com>",
|
|
7
|
+
"types": "index.d.ts",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.8.0",
|
|
10
|
+
"@formatjs/intl-localematcher": "0.6.1",
|
|
11
|
+
"@formatjs/ecma402-abstract": "2.3.4"
|
|
12
|
+
},
|
|
13
|
+
"bugs": "https://github.com/formatjs/formatjs/issues",
|
|
14
|
+
"homepage": "https://github.com/formatjs/formatjs",
|
|
5
15
|
"keywords": [
|
|
6
|
-
"
|
|
16
|
+
"ecma402",
|
|
7
17
|
"i18n",
|
|
18
|
+
"intl",
|
|
8
19
|
"segmenter",
|
|
9
|
-
"unicode",
|
|
10
20
|
"tc39",
|
|
11
|
-
"
|
|
21
|
+
"unicode"
|
|
12
22
|
],
|
|
13
|
-
"author": "Matija Gaspar <matijagaspar@gmail.com>",
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/formatjs/formatjs/issues"
|
|
16
|
-
},
|
|
17
|
-
"repository": {
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git@github.com:formatjs/formatjs.git"
|
|
20
|
-
},
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"tslib": "2",
|
|
23
|
-
"@formatjs/intl-localematcher": "0.6.0",
|
|
24
|
-
"@formatjs/ecma402-abstract": "2.3.3"
|
|
25
|
-
},
|
|
26
23
|
"main": "index.js",
|
|
27
|
-
"
|
|
28
|
-
"homepage": "https://github.com/formatjs/formatjs",
|
|
29
|
-
"license": "MIT"
|
|
24
|
+
"repository": "git@github.com:formatjs/formatjs.git"
|
|
30
25
|
}
|
package/polyfill.iife.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
return Intl.getCanonicalLocales(locales);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
// node_modules/.aspect_rules_js/decimal.js@10.
|
|
28
|
+
// node_modules/.aspect_rules_js/decimal.js@10.5.0/node_modules/decimal.js/decimal.mjs
|
|
29
29
|
var EXP_LIMIT = 9e15;
|
|
30
30
|
var MAX_DIGITS = 1e9;
|
|
31
31
|
var NUMERALS = "0123456789abcdef";
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);
|
|
318
318
|
};
|
|
319
319
|
P.inverseCosine = P.acos = function() {
|
|
320
|
-
var
|
|
320
|
+
var x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
|
|
321
321
|
if (k !== -1) {
|
|
322
322
|
return k === 0 ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) : new Ctor(NaN);
|
|
323
323
|
}
|
|
@@ -325,11 +325,10 @@
|
|
|
325
325
|
return getPi(Ctor, pr + 4, rm).times(0.5);
|
|
326
326
|
Ctor.precision = pr + 6;
|
|
327
327
|
Ctor.rounding = 1;
|
|
328
|
-
x = x.
|
|
329
|
-
halfPi = getPi(Ctor, pr + 4, rm).times(0.5);
|
|
328
|
+
x = new Ctor(1).minus(x).div(x.plus(1)).sqrt().atan();
|
|
330
329
|
Ctor.precision = pr;
|
|
331
330
|
Ctor.rounding = rm;
|
|
332
|
-
return
|
|
331
|
+
return x.times(2);
|
|
333
332
|
};
|
|
334
333
|
P.inverseHyperbolicCosine = P.acosh = function() {
|
|
335
334
|
var pr, rm, x = this, Ctor = x.constructor;
|
|
@@ -1541,14 +1540,16 @@
|
|
|
1541
1540
|
function isOdd(n) {
|
|
1542
1541
|
return n.d[n.d.length - 1] & 1;
|
|
1543
1542
|
}
|
|
1544
|
-
function maxOrMin(Ctor, args,
|
|
1545
|
-
var y, x = new Ctor(args[0]), i = 0;
|
|
1543
|
+
function maxOrMin(Ctor, args, n) {
|
|
1544
|
+
var k, y, x = new Ctor(args[0]), i = 0;
|
|
1546
1545
|
for (; ++i < args.length; ) {
|
|
1547
1546
|
y = new Ctor(args[i]);
|
|
1548
1547
|
if (!y.s) {
|
|
1549
1548
|
x = y;
|
|
1550
1549
|
break;
|
|
1551
|
-
}
|
|
1550
|
+
}
|
|
1551
|
+
k = x.cmp(y);
|
|
1552
|
+
if (k === n || k === 0 && x.s === n) {
|
|
1552
1553
|
x = y;
|
|
1553
1554
|
}
|
|
1554
1555
|
}
|
|
@@ -2130,7 +2131,8 @@
|
|
|
2130
2131
|
x.d = [v];
|
|
2131
2132
|
}
|
|
2132
2133
|
return;
|
|
2133
|
-
}
|
|
2134
|
+
}
|
|
2135
|
+
if (v * 0 !== 0) {
|
|
2134
2136
|
if (!v)
|
|
2135
2137
|
x.s = NaN;
|
|
2136
2138
|
x.e = NaN;
|
|
@@ -2138,18 +2140,28 @@
|
|
|
2138
2140
|
return;
|
|
2139
2141
|
}
|
|
2140
2142
|
return parseDecimal(x, v.toString());
|
|
2141
|
-
} else if (t !== "string") {
|
|
2142
|
-
throw Error(invalidArgument + v);
|
|
2143
2143
|
}
|
|
2144
|
-
if (
|
|
2145
|
-
|
|
2146
|
-
x.s = -1;
|
|
2147
|
-
} else {
|
|
2148
|
-
if (i2 === 43)
|
|
2144
|
+
if (t === "string") {
|
|
2145
|
+
if ((i2 = v.charCodeAt(0)) === 45) {
|
|
2149
2146
|
v = v.slice(1);
|
|
2150
|
-
|
|
2147
|
+
x.s = -1;
|
|
2148
|
+
} else {
|
|
2149
|
+
if (i2 === 43)
|
|
2150
|
+
v = v.slice(1);
|
|
2151
|
+
x.s = 1;
|
|
2152
|
+
}
|
|
2153
|
+
return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);
|
|
2154
|
+
}
|
|
2155
|
+
if (t === "bigint") {
|
|
2156
|
+
if (v < 0) {
|
|
2157
|
+
v = -v;
|
|
2158
|
+
x.s = -1;
|
|
2159
|
+
} else {
|
|
2160
|
+
x.s = 1;
|
|
2161
|
+
}
|
|
2162
|
+
return parseDecimal(x, v.toString());
|
|
2151
2163
|
}
|
|
2152
|
-
|
|
2164
|
+
throw Error(invalidArgument + v);
|
|
2153
2165
|
}
|
|
2154
2166
|
Decimal2.prototype = P;
|
|
2155
2167
|
Decimal2.ROUND_UP = 0;
|
|
@@ -2259,10 +2271,10 @@
|
|
|
2259
2271
|
return new this(x).log(10);
|
|
2260
2272
|
}
|
|
2261
2273
|
function max() {
|
|
2262
|
-
return maxOrMin(this, arguments,
|
|
2274
|
+
return maxOrMin(this, arguments, -1);
|
|
2263
2275
|
}
|
|
2264
2276
|
function min() {
|
|
2265
|
-
return maxOrMin(this, arguments,
|
|
2277
|
+
return maxOrMin(this, arguments, 1);
|
|
2266
2278
|
}
|
|
2267
2279
|
function mod(x, y) {
|
|
2268
2280
|
return new this(x).mod(y);
|
|
@@ -8669,10 +8681,10 @@
|
|
|
8669
8681
|
|
|
8670
8682
|
decimal.js/decimal.mjs:
|
|
8671
8683
|
(*!
|
|
8672
|
-
* decimal.js v10.
|
|
8684
|
+
* decimal.js v10.5.0
|
|
8673
8685
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
8674
8686
|
* https://github.com/MikeMcl/decimal.js
|
|
8675
|
-
* Copyright (c)
|
|
8687
|
+
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
8676
8688
|
* MIT Licence
|
|
8677
8689
|
*)
|
|
8678
8690
|
*/
|