@formatjs/intl-supportedvaluesof 2.4.0 → 3.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formatjs/intl-supportedvaluesof",
3
- "version": "2.4.0",
3
+ "version": "3.0.0",
4
4
  "description": "Intl.supportedValuesOf polyfill",
5
5
  "keywords": [
6
6
  "ecma402",
package/polyfill-force.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { memoize, strategies } from "@formatjs/fast-memoize";
2
- //#region packages/ecma262-abstract/ToString.js
2
+ // packages/ecma262-abstract/ToString.js
3
3
  /**
4
4
  * https://tc39.es/ecma262/#sec-tostring
5
5
  */
@@ -7,8 +7,7 @@ function ToString(o) {
7
7
  if (typeof o === "symbol") throw TypeError("Cannot convert a Symbol value to a string");
8
8
  return String(o);
9
9
  }
10
- //#endregion
11
- //#region packages/intl-supportedvaluesof/memoize.ts
10
+ // packages/intl-supportedvaluesof/memoize.ts
12
11
  /**
13
12
  * Implementation: Memoized factory for Intl.DateTimeFormat instances
14
13
  *
@@ -18,8 +17,7 @@ function ToString(o) {
18
17
  * Uses variadic memoization strategy to handle varying numbers of constructor arguments.
19
18
  */
20
19
  const createMemoizedDateTimeFormat = memoize((...args) => new Intl.DateTimeFormat(...args), { strategy: strategies.variadic });
21
- //#endregion
22
- //#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/calendars.js
20
+ // node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/calendars.js
23
21
  const calendars = [
24
22
  "buddhist",
25
23
  "chinese",
@@ -41,8 +39,7 @@ const calendars = [
41
39
  "persian",
42
40
  "roc"
43
41
  ];
44
- //#endregion
45
- //#region packages/intl-supportedvaluesof/get-supported-calendars.ts
42
+ // packages/intl-supportedvaluesof/get-supported-calendars.ts
46
43
  /**
47
44
  * Implementation: Tests if a calendar is supported by attempting to create
48
45
  * a DateTimeFormat with that calendar and verifying it was accepted.
@@ -64,8 +61,7 @@ function isSupportedCalendar(item) {
64
61
  function getSupportedCalendars() {
65
62
  return calendars.filter(isSupportedCalendar).sort();
66
63
  }
67
- //#endregion
68
- //#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/collations.js
64
+ // node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/collations.js
69
65
  const collations = [
70
66
  "big5han",
71
67
  "compat",
@@ -87,8 +83,7 @@ const collations = [
87
83
  "unihan",
88
84
  "zhuyin"
89
85
  ];
90
- //#endregion
91
- //#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.collation@0.0.0/node_modules/@formatjs_generated/cldr.collation/locale-data.js
86
+ // node_modules/.aspect_rules_js/@formatjs_generated+cldr.collation@0.0.0/node_modules/@formatjs_generated/cldr.collation/locale-data.js
92
87
  const collationCandidateLocales = {
93
88
  "emoji": [
94
89
  "aa",
@@ -387,8 +382,7 @@ const collationCandidateLocales = {
387
382
  "stroke": ["zh", "zh-Hant"],
388
383
  "zhuyin": ["zh", "zh-Hant"]
389
384
  };
390
- //#endregion
391
- //#region packages/intl-supportedvaluesof/get-supported-collations.ts
385
+ // packages/intl-supportedvaluesof/get-supported-collations.ts
392
386
  function isSupportedCollation(collation) {
393
387
  const candidates = collationCandidateLocales[collation] || ["en"];
394
388
  for (const locale of candidates) try {
@@ -399,8 +393,7 @@ function isSupportedCollation(collation) {
399
393
  function getSupportedCollations() {
400
394
  return collations.filter(isSupportedCollation).sort();
401
395
  }
402
- //#endregion
403
- //#region packages/ecma402-abstract/utils.js
396
+ // packages/ecma402-abstract/utils.js
404
397
  function defineProperty(target, name, { value }) {
405
398
  Object.defineProperty(target, name, {
406
399
  configurable: true,
@@ -421,8 +414,7 @@ function ensureIntl() {
421
414
  const createMemoizedNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });
422
415
  memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });
423
416
  memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });
424
- //#endregion
425
- //#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/currencies.js
417
+ // node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/currencies.js
426
418
  const currencies = [
427
419
  "ADP",
428
420
  "AED",
@@ -490,7 +482,6 @@ const currencies = [
490
482
  "CLF",
491
483
  "CLP",
492
484
  "CNH",
493
- "CNX",
494
485
  "CNY",
495
486
  "COP",
496
487
  "COU",
@@ -732,8 +723,7 @@ const currencies = [
732
723
  "ZWL",
733
724
  "ZWR"
734
725
  ];
735
- //#endregion
736
- //#region packages/intl-supportedvaluesof/get-supported-currencies.ts
726
+ // packages/intl-supportedvaluesof/get-supported-currencies.ts
737
727
  /**
738
728
  * Implementation: Tests if a currency is supported by attempting to create
739
729
  * a NumberFormat with that currency and verifying it was accepted.
@@ -772,8 +762,7 @@ function getSupportedCurrencies() {
772
762
  }
773
763
  return supportedCurrencies.sort();
774
764
  }
775
- //#endregion
776
- //#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.number@0.0.0/node_modules/@formatjs_generated/cldr.number/numbering-systems.js
765
+ // node_modules/.aspect_rules_js/@formatjs_generated+cldr.number@0.0.0/node_modules/@formatjs_generated/cldr.number/numbering-systems.js
777
766
  const numberingSystemNames = [
778
767
  "adlm",
779
768
  "ahom",
@@ -873,8 +862,7 @@ const numberingSystemNames = [
873
862
  "wara",
874
863
  "wcho"
875
864
  ];
876
- //#endregion
877
- //#region packages/intl-supportedvaluesof/get-supported-numbering-systems.ts
865
+ // packages/intl-supportedvaluesof/get-supported-numbering-systems.ts
878
866
  /**
879
867
  * Implementation: Tests if a numbering system is supported by attempting to create
880
868
  * a NumberFormat with that numbering system and verifying it was accepted.
@@ -897,8 +885,7 @@ function isSupportedNumberingSystem(system) {
897
885
  function getSupportedNumberingSystems() {
898
886
  return numberingSystemNames.filter(isSupportedNumberingSystem).sort();
899
887
  }
900
- //#endregion
901
- //#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/timezones.js
888
+ // node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/timezones.js
902
889
  const timezones = [
903
890
  "Africa/Abidjan",
904
891
  "Africa/Accra",
@@ -1359,8 +1346,7 @@ const timezones = [
1359
1346
  "Pacific/Wallis",
1360
1347
  "UTC"
1361
1348
  ];
1362
- //#endregion
1363
- //#region packages/intl-supportedvaluesof/get-supported-timezones.ts
1349
+ // packages/intl-supportedvaluesof/get-supported-timezones.ts
1364
1350
  /**
1365
1351
  * Implementation: Tests if a timezone is supported by attempting to create
1366
1352
  * a DateTimeFormat with that timezone and verifying it was accepted.
@@ -1382,8 +1368,7 @@ function isSupportedTimeZone(timeZone) {
1382
1368
  function getSupportedTimeZones() {
1383
1369
  return timezones.filter(isSupportedTimeZone).sort();
1384
1370
  }
1385
- //#endregion
1386
- //#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/units.js
1371
+ // node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/units.js
1387
1372
  const units = [
1388
1373
  "degree",
1389
1374
  "acre",
@@ -1431,8 +1416,7 @@ const units = [
1431
1416
  "liter",
1432
1417
  "milliliter"
1433
1418
  ];
1434
- //#endregion
1435
- //#region packages/intl-supportedvaluesof/get-supported-units.ts
1419
+ // packages/intl-supportedvaluesof/get-supported-units.ts
1436
1420
  /**
1437
1421
  * Implementation: Tests if a unit is supported by attempting to create
1438
1422
  * a NumberFormat with that unit and verifying it was accepted.
@@ -1457,8 +1441,7 @@ function isSupportedUnit(unit) {
1457
1441
  function getSupportedUnits() {
1458
1442
  return units.filter(isSupportedUnit).sort();
1459
1443
  }
1460
- //#endregion
1461
- //#region packages/intl-supportedvaluesof/index.ts
1444
+ // packages/intl-supportedvaluesof/index.ts
1462
1445
  /**
1463
1446
  * ECMA-402 Spec: Intl.supportedValuesOf(key)
1464
1447
  * ECMA-402 §8.3.2 Intl.supportedValuesOf, step 1.
@@ -1488,6 +1471,5 @@ const supportedValuesOf = { supportedValuesOf(key) {
1488
1471
  }
1489
1472
  } }.supportedValuesOf;
1490
1473
  defineProperty(ensureIntl(), "supportedValuesOf", { value: supportedValuesOf });
1491
- //#endregion
1492
1474
 
1493
1475
  //# sourceMappingURL=polyfill-force.js.map