split-by
Split an array or a string by another array or string.
example
var splitBy = ;var xs = 3 4 0 0 0 2 1 0 5 0 0 0 5 2 1 ;var res = ;consoledirres;
output:
[ [ 3, 4 ], [ 2, 1, 0, 5 ], [ 5, 2, 1 ] ]
methods
var splitBy =
splitBy(xs, ys)
Return an array of xs
split by ys
, not including the elements split on.
install
With npm do:
npm install split-by
license
MIT