Creates an array of elements split into two groups.
npm install -S @jswork/next-partition
import '@jswork/next-partition';
const rs = nx.partition([1, 2, 3], function(_, n) {
return n % 2;
});
//result:
[
[1,3],
[2]
]
Code released under the MIT license.