partition-all
Returns a sequence of arrays, but may include partitions with fewer than n items at the end.
Installation
npm install partition-all --save
Usage
var partitionAll = ; ; // => [[1, 2], [3, 4], [5, 6]]; // => [[1, 2], [3, 4], [5]]; // => [[1, 2, 3], [4, 5]] var partition2 = ; ; // => [[1, 2], [3, 4], [5, 6]]