@formatjs/intl-getcanonicallocales 2.2.1 → 2.3.1

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.shouldPolyfill = void 0;
3
+ exports.shouldPolyfill = shouldPolyfill;
4
4
  function shouldPolyfill() {
5
5
  return (typeof Intl === 'undefined' ||
6
6
  !('getCanonicalLocales' in Intl) ||
@@ -9,4 +9,3 @@ function shouldPolyfill() {
9
9
  Intl.getCanonicalLocales('und-x-private')[0] ===
10
10
  'x-private');
11
11
  }
12
- exports.shouldPolyfill = shouldPolyfill;
@@ -12,6 +12,7 @@ exports.languageAlias = {
12
12
  "afr": "af",
13
13
  "agp": "apf",
14
14
  "ais": "ami",
15
+ "ajt": "aeb",
15
16
  "aju": "jrb",
16
17
  "aka": "ak",
17
18
  "alb": "sq",
@@ -234,6 +235,7 @@ exports.languageAlias = {
234
235
  "kzh": "dgl",
235
236
  "kzj": "dtp",
236
237
  "kzt": "dtp",
238
+ "lak": "ksp",
237
239
  "lao": "lo",
238
240
  "lat": "la",
239
241
  "lav": "lv",
@@ -374,9 +376,11 @@ exports.languageAlias = {
374
376
  "slk": "sk",
375
377
  "slo": "sk",
376
378
  "slv": "sl",
379
+ "smd": "kmb",
377
380
  "sme": "se",
378
381
  "smo": "sm",
379
382
  "sna": "sn",
383
+ "snb": "iba",
380
384
  "snd": "sd",
381
385
  "som": "so",
382
386
  "sot": "st",
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.canonicalizeUnicodeLocaleId = exports.canonicalizeUnicodeLanguageId = void 0;
3
+ exports.canonicalizeUnicodeLanguageId = canonicalizeUnicodeLanguageId;
4
+ exports.canonicalizeUnicodeLocaleId = canonicalizeUnicodeLocaleId;
4
5
  var tslib_1 = require("tslib");
5
6
  var aliases_generated_1 = require("./aliases.generated");
6
7
  var parser_1 = require("./parser");
@@ -186,7 +187,6 @@ function canonicalizeUnicodeLanguageId(unicodeLanguageId) {
186
187
  }
187
188
  return finalLangAst;
188
189
  }
189
- exports.canonicalizeUnicodeLanguageId = canonicalizeUnicodeLanguageId;
190
190
  /**
191
191
  * Canonicalize based on
192
192
  * https://www.unicode.org/reports/tr35/tr35.html#Canonical_Unicode_Locale_Identifiers
@@ -221,4 +221,3 @@ function canonicalizeUnicodeLocaleId(locale) {
221
221
  }
222
222
  return locale;
223
223
  }
224
- exports.canonicalizeUnicodeLocaleId = canonicalizeUnicodeLocaleId;
package/src/emitter.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.emitUnicodeLocaleId = exports.emitUnicodeLanguageId = void 0;
3
+ exports.emitUnicodeLanguageId = emitUnicodeLanguageId;
4
+ exports.emitUnicodeLocaleId = emitUnicodeLocaleId;
4
5
  var tslib_1 = require("tslib");
5
6
  function emitUnicodeLanguageId(lang) {
6
7
  if (!lang) {
@@ -9,7 +10,6 @@ function emitUnicodeLanguageId(lang) {
9
10
  return tslib_1.__spreadArray([lang.lang, lang.script, lang.region], (lang.variants || []), true).filter(Boolean)
10
11
  .join('-');
11
12
  }
12
- exports.emitUnicodeLanguageId = emitUnicodeLanguageId;
13
13
  function emitUnicodeLocaleId(_a) {
14
14
  var lang = _a.lang, extensions = _a.extensions;
15
15
  var chunks = [emitUnicodeLanguageId(lang)];
@@ -30,4 +30,3 @@ function emitUnicodeLocaleId(_a) {
30
30
  }
31
31
  return chunks.filter(Boolean).join('-');
32
32
  }
33
- exports.emitUnicodeLocaleId = emitUnicodeLocaleId;