@formatjs/intl-getcanonicallocales 2.2.0 → 2.2.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.
- package/index.d.ts +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/polyfill-force.d.ts +0 -1
- package/lib/polyfill.d.ts +0 -1
- package/lib/should-polyfill.d.ts +0 -1
- package/lib/src/aliases.generated.d.ts +0 -1
- package/lib/src/canonicalizer.d.ts +0 -1
- package/lib/src/emitter.d.ts +0 -1
- package/lib/src/likelySubtags.generated.d.ts +0 -1
- package/lib/src/parser.d.ts +0 -1
- package/lib/src/types.d.ts +0 -1
- package/package.json +1 -1
- package/polyfill-force.d.ts +0 -1
- package/polyfill.d.ts +0 -1
- package/polyfill.iife.js +9 -9
- package/should-polyfill.d.ts +0 -1
- package/src/aliases.generated.d.ts +0 -1
- package/src/canonicalizer.d.ts +0 -1
- package/src/emitter.d.ts +0 -1
- package/src/likelySubtags.generated.d.ts +0 -1
- package/src/parser.d.ts +0 -1
- package/src/types.d.ts +0 -1
package/index.d.ts
CHANGED
package/lib/index.d.ts
CHANGED
package/lib/polyfill-force.d.ts
CHANGED
package/lib/polyfill.d.ts
CHANGED
package/lib/should-polyfill.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ export declare const languageAlias: Record<string, string>;
|
|
|
2
2
|
export declare const territoryAlias: Record<string, string>;
|
|
3
3
|
export declare const scriptAlias: Record<string, string>;
|
|
4
4
|
export declare const variantAlias: Record<string, string>;
|
|
5
|
-
//# sourceMappingURL=aliases.generated.d.ts.map
|
package/lib/src/emitter.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { UnicodeLanguageId, UnicodeLocaleId } from './types';
|
|
2
2
|
export declare function emitUnicodeLanguageId(lang?: UnicodeLanguageId): string;
|
|
3
3
|
export declare function emitUnicodeLocaleId({ lang, extensions, }: UnicodeLocaleId): string;
|
|
4
|
-
//# sourceMappingURL=emitter.d.ts.map
|
package/lib/src/parser.d.ts
CHANGED
|
@@ -7,4 +7,3 @@ export declare function isUnicodeScriptSubtag(script: string): boolean;
|
|
|
7
7
|
export declare function isUnicodeVariantSubtag(variant: string): boolean;
|
|
8
8
|
export declare function parseUnicodeLanguageId(chunks: string[] | string): UnicodeLanguageId;
|
|
9
9
|
export declare function parseUnicodeLocaleId(locale: string): UnicodeLocaleId;
|
|
10
|
-
//# sourceMappingURL=parser.d.ts.map
|
package/lib/src/types.d.ts
CHANGED
package/package.json
CHANGED
package/polyfill-force.d.ts
CHANGED
package/polyfill.d.ts
CHANGED
package/polyfill.iife.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(() => {
|
|
2
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/
|
|
2
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/tslib@2.4.0/node_modules/tslib/tslib.es6.js
|
|
3
3
|
var __assign = function() {
|
|
4
4
|
__assign = Object.assign || function __assign2(t) {
|
|
5
5
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/
|
|
27
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/intl-getcanonicallocales/lib/src/parser.js
|
|
28
28
|
var ALPHANUM_1_8 = /^[a-z0-9]{1,8}$/i;
|
|
29
29
|
var ALPHANUM_2_8 = /^[a-z0-9]{2,8}$/i;
|
|
30
30
|
var ALPHANUM_3_8 = /^[a-z0-9]{3,8}$/i;
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
return __assign({ lang }, parseExtensions(chunks));
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/
|
|
244
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/intl-getcanonicallocales/lib/src/emitter.js
|
|
245
245
|
function emitUnicodeLanguageId(lang) {
|
|
246
246
|
if (!lang) {
|
|
247
247
|
return "";
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
return chunks.filter(Boolean).join("-");
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/
|
|
276
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/intl-getcanonicallocales/lib/src/aliases.generated.js
|
|
277
277
|
var languageAlias = {
|
|
278
278
|
"aa-saaho": "ssy",
|
|
279
279
|
"aam": "aas",
|
|
@@ -1410,7 +1410,7 @@
|
|
|
1410
1410
|
"polytoni": "polyton"
|
|
1411
1411
|
};
|
|
1412
1412
|
|
|
1413
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/
|
|
1413
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/intl-getcanonicallocales/lib/src/likelySubtags.generated.js
|
|
1414
1414
|
var likelySubtags = {
|
|
1415
1415
|
"aa": "aa-Latn-ET",
|
|
1416
1416
|
"aai": "aai-Latn-ZZ",
|
|
@@ -3280,7 +3280,7 @@
|
|
|
3280
3280
|
"zza": "zza-Latn-TR"
|
|
3281
3281
|
};
|
|
3282
3282
|
|
|
3283
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/
|
|
3283
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/intl-getcanonicallocales/lib/src/canonicalizer.js
|
|
3284
3284
|
function canonicalizeAttrs(strs) {
|
|
3285
3285
|
return Object.keys(strs.reduce(function(all, str) {
|
|
3286
3286
|
all[str.toLowerCase()] = 1;
|
|
@@ -3461,7 +3461,7 @@
|
|
|
3461
3461
|
return locale;
|
|
3462
3462
|
}
|
|
3463
3463
|
|
|
3464
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/
|
|
3464
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/intl-getcanonicallocales/lib/index.js
|
|
3465
3465
|
function CanonicalizeLocaleList(locales) {
|
|
3466
3466
|
if (locales === void 0) {
|
|
3467
3467
|
return [];
|
|
@@ -3483,14 +3483,14 @@
|
|
|
3483
3483
|
return CanonicalizeLocaleList(locales);
|
|
3484
3484
|
}
|
|
3485
3485
|
|
|
3486
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/
|
|
3486
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/intl-getcanonicallocales/lib/should-polyfill.js
|
|
3487
3487
|
function shouldPolyfill() {
|
|
3488
3488
|
return typeof Intl === "undefined" || !("getCanonicalLocales" in Intl) || // Native Intl.getCanonicalLocales is just buggy
|
|
3489
3489
|
// https://bugs.chromium.org/p/v8/issues/detail?id=10682
|
|
3490
3490
|
Intl.getCanonicalLocales("und-x-private")[0] === "x-private";
|
|
3491
3491
|
}
|
|
3492
3492
|
|
|
3493
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/
|
|
3493
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/intl-getcanonicallocales/lib/polyfill.js
|
|
3494
3494
|
if (typeof Intl === "undefined") {
|
|
3495
3495
|
if (typeof window !== "undefined") {
|
|
3496
3496
|
Object.defineProperty(window, "Intl", {
|
package/should-polyfill.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ export declare const languageAlias: Record<string, string>;
|
|
|
2
2
|
export declare const territoryAlias: Record<string, string>;
|
|
3
3
|
export declare const scriptAlias: Record<string, string>;
|
|
4
4
|
export declare const variantAlias: Record<string, string>;
|
|
5
|
-
//# sourceMappingURL=aliases.generated.d.ts.map
|
package/src/canonicalizer.d.ts
CHANGED
package/src/emitter.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { UnicodeLanguageId, UnicodeLocaleId } from './types';
|
|
2
2
|
export declare function emitUnicodeLanguageId(lang?: UnicodeLanguageId): string;
|
|
3
3
|
export declare function emitUnicodeLocaleId({ lang, extensions, }: UnicodeLocaleId): string;
|
|
4
|
-
//# sourceMappingURL=emitter.d.ts.map
|
package/src/parser.d.ts
CHANGED
|
@@ -7,4 +7,3 @@ export declare function isUnicodeScriptSubtag(script: string): boolean;
|
|
|
7
7
|
export declare function isUnicodeVariantSubtag(variant: string): boolean;
|
|
8
8
|
export declare function parseUnicodeLanguageId(chunks: string[] | string): UnicodeLanguageId;
|
|
9
9
|
export declare function parseUnicodeLocaleId(locale: string): UnicodeLocaleId;
|
|
10
|
-
//# sourceMappingURL=parser.d.ts.map
|
package/src/types.d.ts
CHANGED