@formatjs/intl-displaynames 6.8.9 → 6.8.11

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.
Files changed (2) hide show
  1. package/package.json +20 -25
  2. package/polyfill.iife.js +36 -24
package/package.json CHANGED
@@ -1,35 +1,30 @@
1
1
  {
2
2
  "name": "@formatjs/intl-displaynames",
3
- "version": "6.8.9",
4
3
  "description": "Polyfill for: https://tc39.es/proposal-intl-displaynames",
5
- "keywords": [
6
- "i18n",
7
- "polyfill",
8
- "intl-polyfill",
9
- "localization",
10
- "formatjs",
11
- "Intl.DisplayNames",
12
- "Intl"
13
- ],
14
- "author": "Linjie Ding <pyrocat101@users.noreply.github.com>",
15
- "homepage": "https://github.com/formatjs/formatjs",
4
+ "version": "6.8.11",
16
5
  "license": "MIT",
17
- "main": "index.js",
6
+ "author": "Linjie Ding <pyrocat101@users.noreply.github.com>",
18
7
  "types": "index.d.ts",
19
- "repository": {
20
- "type": "git",
21
- "url": "git+https://github.com/formatjs/formatjs.git"
22
- },
23
8
  "dependencies": {
24
- "tslib": "2",
25
- "@formatjs/ecma402-abstract": "2.3.2",
26
- "@formatjs/intl-localematcher": "0.5.10"
9
+ "tslib": "^2.8.0",
10
+ "@formatjs/ecma402-abstract": "2.3.4",
11
+ "@formatjs/intl-localematcher": "0.6.1"
27
12
  },
28
13
  "devDependencies": {
29
- "@formatjs/intl-getcanonicallocales": "2.5.4",
30
- "@formatjs/intl-locale": "4.2.9"
14
+ "@formatjs/intl-getcanonicallocales": "2.5.5",
15
+ "@formatjs/intl-locale": "4.2.11"
31
16
  },
32
- "bugs": {
33
- "url": "https://github.com/formatjs/formatjs/issues"
34
- }
17
+ "bugs": "https://github.com/formatjs/formatjs/issues",
18
+ "homepage": "https://github.com/formatjs/formatjs",
19
+ "keywords": [
20
+ "formatjs",
21
+ "i18n",
22
+ "Intl",
23
+ "intl-polyfill",
24
+ "Intl.DisplayNames",
25
+ "localization",
26
+ "polyfill"
27
+ ],
28
+ "main": "index.js",
29
+ "repository": "formatjs/formatjs.git"
35
30
  }
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.4.3/node_modules/decimal.js/decimal.mjs
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 halfPi, x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
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.asin();
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 halfPi.minus(x);
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, ltgt) {
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
- } else if (x[ltgt](y)) {
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
- } else if (v * 0 !== 0) {
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 ((i2 = v.charCodeAt(0)) === 45) {
2145
- v = v.slice(1);
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
- x.s = 1;
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);
2151
2154
  }
2152
- return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);
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());
2163
+ }
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, "lt");
2274
+ return maxOrMin(this, arguments, -1);
2263
2275
  }
2264
2276
  function min() {
2265
- return maxOrMin(this, arguments, "gt");
2277
+ return maxOrMin(this, arguments, 1);
2266
2278
  }
2267
2279
  function mod(x, y) {
2268
2280
  return new this(x).mod(y);
@@ -6727,7 +6739,7 @@
6727
6739
  }).reduce(function(all, list) {
6728
6740
  return __spreadArray(__spreadArray([], all, true), list, true);
6729
6741
  }, []);
6730
- matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > 1 != shouldInclude));
6742
+ matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > -1 != shouldInclude));
6731
6743
  } else {
6732
6744
  matches && (matches = locale.region ? region === "*" || region === locale.region : true);
6733
6745
  }
@@ -6788,7 +6800,7 @@
6788
6800
  region: ""
6789
6801
  }, {
6790
6802
  language: supportedLocale.language,
6791
- script: desiredLSR.script,
6803
+ script: supportedLSR.script,
6792
6804
  region: ""
6793
6805
  }, data2);
6794
6806
  }
@@ -7482,10 +7494,10 @@
7482
7494
 
7483
7495
  decimal.js/decimal.mjs:
7484
7496
  (*!
7485
- * decimal.js v10.4.3
7497
+ * decimal.js v10.5.0
7486
7498
  * An arbitrary-precision Decimal type for JavaScript.
7487
7499
  * https://github.com/MikeMcl/decimal.js
7488
- * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
7500
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
7489
7501
  * MIT Licence
7490
7502
  *)
7491
7503
  */