@formatjs/intl-getcanonicallocales
Version:
Intl.getCanonicalLocales polyfill
12 lines (11 loc) • 440 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.shouldPolyfill = shouldPolyfill;
function shouldPolyfill() {
return (typeof Intl === 'undefined' ||
!('getCanonicalLocales' in Intl) ||
// Native Intl.getCanonicalLocales is just buggy
// https://bugs.chromium.org/p/v8/issues/detail?id=10682
Intl.getCanonicalLocales('und-x-private')[0] ===
'x-private');
}