Aller au contenu principal

Intl.supportedValuesOf

Traduction Bêta Non Officielle

Cette page a été traduite par PageTurner AI (bêta). Non approuvée officiellement par le projet. Vous avez trouvé une erreur ? Signaler un problème →

Un polyfill/ponyfill conforme à la spécification pour Intl.supportedValuesOf.

npm Version size

Installation

npm i @formatjs/intl-enumerator

Prérequis

Utilisation

Exemple simple

import '@formatjs/intl-enumerator/polyfill'

Import dynamique + détection de capacités

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

Cette bibliothèque est conforme à test262.