0.1.1 • Published 5 years ago
ander v0.1.1
ander
Render a list of items as dictated by the locale. The formats are extracted from the CLDR.
Installation
npm install ander
Syntax
ander(itemsArray, localeId = 'en-US')
Returns a string with the formatted list items.
Examples
const ander = require('ander');
// American English:
console.log(ander(['foo', 'bar', 'quux'], 'en-US'));
// foo, bar, and quux
// Arabic:
console.log(ander(['foo', 'bar', 'quux'], 'ar'));
// foo، bar، وquux