Intl.supportedValuesOf
Inoffizielle Beta-Übersetzung
Diese Seite wurde von PageTurner AI übersetzt (Beta). Nicht offiziell vom Projekt unterstützt. Fehler gefunden? Problem melden →
Eine spezifikationskonforme Polyfill/Ponyfill-Implementierung für Intl.supportedValuesOf.
Installation
- npm
- yarn
npm i @formatjs/intl-enumerator
yarn add @formatjs/intl-enumerator
Anforderungen
Verwendung
Einfach
import '@formatjs/intl-enumerator/polyfill'
Dynamischer Import + Funktionserkennung
import {shouldPolyfill} from '@formatjs/intl-enumerator/should-polyfill'
async function polyfill() {
// This platform already supports Intl.supportedValuesOf
if (shouldPolyfill()) {
await import('@formatjs/intl-enumerator/polyfill')
}
// Alternatively, force the polyfill regardless of support
await import('@formatjs/intl-enumerator/polyfill-force')
}
Tests
Diese Bibliothek ist test262-konform.