1.0.0 • Published 6 years ago
array-spliter v1.0.0
Easy to get an array of strings split at each point where the separator occurs in the given string.
Install
$ npm install array-spliter
Usage
const arraySpliter = require('array-spliter');
arraySpliter('abcd', '');
//=> [a, b, c, d]
arraySpliter('a,b,c,d', ',');
//=> [a, b, c, d]
arraySpliter('a@b@c@d', '@');
//=> [a, b, c, d]
arraySpliter('a:b,c#d', ['#', ',', ':']);
//=> [a, b, c, d]
arraySpliter('a,b|c#d', ['|', ',', '#']);
//=> [a, b, c, d]
License
MIT © JeffMinsungKim
1.0.0
6 years ago