Socket
Socket
Sign inDemoInstall

@formatjs/intl-listformat

Package Overview
Dependencies
1
Maintainers
2
Versions
140
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @formatjs/intl-listformat

Formats JS list in a i18n-safe way


Version published
Maintainers
2
Install size
4.21 MB
Created

Readme

Source

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 @formatjs/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 '@formatjs/intl-listformat/polyfill'

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

To use this as a ponyfill:

import IntlListFormat from '@formatjs/intl-listformat'

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

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

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

import '@formatjs/intl-listformat/polyfill-locales'

Tests

This library is fully test262-compliant.

License

This software is free to use under the MIT license. See the [LICENSE file][license] for license text and copyright information.

Keywords

FAQs

Last updated on 21 Nov 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc