pa

partition-all

Clojure's partition-all in js

Showing:

Popularity

Downloads/wk

10

GitHub Stars

8

Maintenance

Last Commit

7yrs ago

Contributors

0

Package

Dependencies

1

Size (min+gzip)

0.8KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

partition-all

Build Status npm version

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 = require('partition-all');

partitionAll(2, [1, 2, 3, 4, 5, 6]); // => [[1, 2], [3, 4], [5, 6]]
partitionAll(2, [1, 2, 3, 4, 5]); // => [[1, 2], [3, 4], [5]]
partitionAll(3, [1, 2, 3, 4, 5]); // => [[1, 2, 3], [4, 5]]

var partition2 = partitionAll(2);

partition2([1, 2, 3, 4, 5, 6]); // => [[1, 2], [3, 4], [5, 6]]

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100