Splits the array every time the given predicate fires. The element the split appears on will not be included!
splitArrayOn(['a', '', 'b', '', '', 'c'], elem => elem === '')// => [['a'], ['b'], [], ['c']] Copy
splitArrayOn(['a', '', 'b', '', '', 'c'], elem => elem === '')// => [['a'], ['b'], [], ['c']]
splitArrayOn([1,2,3], elem => true)// => [[], [], [], []] Copy
splitArrayOn([1,2,3], elem => true)// => [[], [], [], []]
Splits the array every time the given predicate fires. The element the split appears on will not be included!