@f-fjs/intl-listformat
TypeScript icon, indicating that this package has built-in type declarations

1.4.2 • Public • Published

Intl ListFormat

A spec-compliant polyfill/ponyfill for Intl.ListFormat fully tested by the official ECMAScript Conformance test suite

npm Version size

Installation

npm install @f-fjs/intl-listformat

Usage

To use the polyfill, just import it to make sure that a fully functional Intl.ListFormat is available in your environment:

import '@f-fjs/intl-listformat/polyfill'

If Intl.ListFormat already exists, the polyfill will not be loaded.

To use this as a ponyfill:

import IntlListFormat from '@f-fjs/intl-listformat'

By default, this library comes with en data. To load additional locale, you can include them on demand:

import '@f-fjs/intl-listformat/polyfill';
import '@f-fjs/intl-listformat/dist/locale-data/de'; // Add locale data for de

If you want to polyfill all locales (e.g for Node):

import '@f-fjs/intl-listformat/polyfill-locales'

Tests

This library is fully test262-compliant.

Package Sidebar

Install

npm i @f-fjs/intl-listformat

Weekly Downloads

3

Version

1.4.2

License

MIT

Unpacked Size

4.56 MB

Total Files

265

Last publish

Collaborators

  • hitko