1.0.2 • Published 5 years ago

array-partitioner v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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