1.0.2 • Published 9 years ago
grammarray v1.0.2
grammarray
Array to a better string.
Install
$ npm install --save grammarray
Usage
var grammarray = require('grammarray');
var arr = ['Marvin Gaye', 'Led Zeppelin', 'Bigge'];
grammarray(arr);
//=> 'Marvin Gaye, Led Zeppelin and Biggie'
grammarray(arr, {
before: '~~ ',
delimiter: ' and ',
lastDelimiter: 'but also',
after: ' ~~'
});
//=> '~~ Marvin Gaye and Led Zeppelin but also Biggie ~~'
License
MIT © David Öhlin