1.0.0 • Published 6 years ago

array-spliter v1.0.0

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

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