1.0.4 • Published 3 years ago

group-array-elements v1.0.4

Weekly downloads
5
License
ISC
Repository
-
Last release
3 years ago

Group Array Elements

What

A function which splits an array into N equally sized arrays.

Where the size of the original array cannot be divided equally by N, the final part should have a length equal to the remainder.

Why

This is for a technical test. Pushing it to Github and NPM was not a requirement.

Getting started

npm i group-array-elements

How to use

import { groupArrayElements } from 'group-array-elements'

groupArrayElements([1,2,3,4,5], 3)
// returns [[1,2], [3,4], [5]]

Contributing

git clone git@github.com:Thebigbignooby/group-array-elements.git

CD into the project.

npm i

and you're ready to go, try running some tests with:

npm run test
1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago