@formatjs/intl-getcanonicallocales 3.4.1 → 3.4.2

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.
@@ -3,7 +3,7 @@ function shouldPolyfill() {
3
3
  if (typeof Intl === "undefined" || typeof Intl.getCanonicalLocales !== "function") return true;
4
4
  try {
5
5
  const canonicalize = Intl.getCanonicalLocales;
6
- return canonicalize("und-x-private")[0] !== "und-x-private" || canonicalize("en-u-aa-yes")[0] !== "en-u-aa-yes" || canonicalize("en-u-kn-yes")[0] !== "en-u-kn";
6
+ return canonicalize("und-x-private")[0] !== "und-x-private" || canonicalize("en-u-aa-yes")[0] !== "en-u-aa-yes" || canonicalize("en-u-kn-yes")[0] !== "en-u-kn" || canonicalize("en-atom1")[0] !== "en-atom1";
7
7
  } catch {
8
8
  return true;
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"should-polyfill.js","names":[],"sources":["sources/packages/intl-getcanonicallocales/should-polyfill.ts"],"sourcesContent":["export function shouldPolyfill(): boolean {\n if (\n typeof Intl === 'undefined' ||\n typeof (Intl as any).getCanonicalLocales !== 'function'\n ) {\n return true\n }\n try {\n const canonicalize = (Intl as any).getCanonicalLocales\n return (\n // https://bugs.chromium.org/p/v8/issues/detail?id=10682\n canonicalize('und-x-private')[0] !== 'und-x-private' ||\n // ECMA-402 canonicalizes aliases by key; only whole \"true\" values disappear.\n // https://tc39.es/ecma402/#sec-canonicalizeunicodelocaleid\n canonicalize('en-u-aa-yes')[0] !== 'en-u-aa-yes' ||\n canonicalize('en-u-kn-yes')[0] !== 'en-u-kn'\n )\n } catch {\n return true\n }\n}\n"],"mappings":";AAAA,SAAgB,iBAA0B;CACxC,IACE,OAAO,SAAS,eAChB,OAAQ,KAAa,wBAAwB,YAE7C,OAAO;CAET,IAAI;EACF,MAAM,eAAgB,KAAa;EACnC,OAEE,aAAa,eAAe,CAAC,CAAC,OAAO,mBAGrC,aAAa,aAAa,CAAC,CAAC,OAAO,iBACnC,aAAa,aAAa,CAAC,CAAC,OAAO;CAEvC,QAAQ;EACN,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"should-polyfill.js","names":[],"sources":["sources/packages/intl-getcanonicallocales/should-polyfill.ts"],"sourcesContent":["export function shouldPolyfill(): boolean {\n if (\n typeof Intl === 'undefined' ||\n typeof (Intl as any).getCanonicalLocales !== 'function'\n ) {\n return true\n }\n try {\n const canonicalize = (Intl as any).getCanonicalLocales\n return (\n // https://bugs.chromium.org/p/v8/issues/detail?id=10682\n canonicalize('und-x-private')[0] !== 'und-x-private' ||\n // ECMA-402 canonicalizes aliases by key; only whole \"true\" values disappear.\n // https://tc39.es/ecma402/#sec-canonicalizeunicodelocaleid\n canonicalize('en-u-aa-yes')[0] !== 'en-u-aa-yes' ||\n canonicalize('en-u-kn-yes')[0] !== 'en-u-kn' ||\n // ECMA-402 §6.2.2 retains valid variants without an alias.\n canonicalize('en-atom1')[0] !== 'en-atom1'\n )\n } catch {\n return true\n }\n}\n"],"mappings":";AAAA,SAAgB,iBAA0B;CACxC,IACE,OAAO,SAAS,eAChB,OAAQ,KAAa,wBAAwB,YAE7C,OAAO;CAET,IAAI;EACF,MAAM,eAAgB,KAAa;EACnC,OAEE,aAAa,eAAe,CAAC,CAAC,OAAO,mBAGrC,aAAa,aAAa,CAAC,CAAC,OAAO,iBACnC,aAAa,aAAa,CAAC,CAAC,OAAO,aAEnC,aAAa,UAAU,CAAC,CAAC,OAAO;CAEpC,QAAQ;EACN,OAAO;CACT;AACF"}