Skip to content

afeiship/next-partition

Repository files navigation

next-partition

Creates an array of elements split into two groups.

version license size download

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.