ander

0.1.1 • Public • Published

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

/ander/

    Package Sidebar

    Install

    npm i ander

    Weekly Downloads

    2

    Version

    0.1.1

    License

    BSD

    Unpacked Size

    79 kB

    Total Files

    6

    Last publish

    Collaborators

    • papandreou