1.2.0 • Published 2 years ago

andlist v1.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

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