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