array-partitioner

1.0.2 • Public • Published

Build Status

array-partitioner

array-partitioner partitions arrays in sub-arrays with specified length.

Usage

import partitionArray from 'array-partitioner';

partitionArray([1, 2, 3, 4, 5, 6], 3); // --> [[1, 2, 3], [4, 5, 6]]

partitionArray([1, 2, 3, 4, 5], 2); // --> [[1, 2], [3, 4], [5]]

Dev

Lint

Based on eslint and extending the Airbnb-Style Guide.

yarn run lint

Test

By using Jest

yarn run test

Build

yarn run build

Readme

Keywords

none

Package Sidebar

Install

npm i array-partitioner

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

4.15 kB

Total Files

4

Last publish

Collaborators

  • ghashange