array-spliter
v1.0.0
Published
Easy to splits a String object into array of strings by separating the string into substrings, using multiple operator strings
Downloads
2
Maintainers
Readme
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