0.1.8 • Published 6 years ago

iterable-split v0.1.8

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

iterable-split

NOTE: iterable-split was renamed to @extra-iterable/split. NPM

Split iterable with separator, like String.split().

const split = require('iterable-split');
// split(<iterable>, [separator=,], [limit], [begin=0], [end], [target=[]], [at])

split('a,cat,sleeps');
// [['a'], ['c', 'a', 't'], ['s', 'l', 'e', 'e', 'p', 's']]
split('a..dog..eats', '.');
// [['a'], ['d', 'o', 'g'], ['e', 'a', 't', 's']]
split('a,b,c,d', ',', 3);
// [['a'], ['b'], ['c']]
split('a,b,c,d', ',', Number.MAX_SAFE_INTEGER, 1);
// [['b'], ['c'], ['d']]
split('a,b,c,d', ',', Number.MAX_SAFE_INTEGER, 1, 6);
// [['b'], ['c']]
split('a,b,c,d', ',', Number.MAX_SAFE_INTEGER, 1, 6, [['z'], ['y']]);
// [['z'], ['y'], ['b'], ['c']]
split('a,b,c,d', ',', Number.MAX_SAFE_INTEGER, 1, 6, [['z'], ['y']], 1);
// [['z'], ['b'], ['c']]
0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago