Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 353 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 353 Bytes

andlist

Turns an array of strings into a friendly delimited string separated by commas and an "and".

Install

$ npm install andlist

Example

const andlist = require('andlist');
const arr = ['one', 'two', 'three', 'four'];

console.log(andlist(arr, ', ', ' and '));
$ node example/basic.js
one, two, three and four