arrford

Array to human readable list converter
Install
npm install --save arrford
Usage
const arrford = require('arrford');
arrford(['run', 'climb', 'jump!']);
arrford(['run', 'climb', 'jump!'], false);
arrford(['run', 'climb!']);
arrford(['run!']);
API
arrford(target [, oxford])
target
Type: Array
of strings
oxford
optional
Type: boolean
Default: true
Description: whether to use the Oxford comma or not
Take an array of strings and return a string of these items as an english list. Insert "," and "and" in a grammatically correct way. Follow the Oxford comma trend unless false
is passed in for the second argument.
Returns: string
License
Do What The F*ck You Want To Public License v2 (WTFPL-2.0) © Dawson Botsford