listformat

1.0.2 • Public • Published

ListFormat Ponyfill

This is a simple ponyfill for Intl.ListFormat.

Call it with an Array of strings, and it'll reduce them down to one string in a list format:

import listFormat from 'listFormat'
listFormat(['a', 'b', 'c']) === 'a, b, and c'

If Intl.ListFormat is available on the engine you're running, it'll use that.

Readme

Keywords

none

Package Sidebar

Install

npm i listformat

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

1.97 kB

Total Files

4

Last publish

Collaborators

  • keithamus