array-cutter
v0.0.2
Published
Make an equal division to an array.
Downloads
4
Readme
array-cutter
Make an equal division to an array.
Install
$ npm install --save array-cutter
Usage
const arrayCutter = require('array-cutter')
arrayCutter([1, 2, 3, 4, 5, 6, 7])
// returns
// array is divided by 5
[
[1, 2, 3, 4, 5],
[6, 7]
]
// divided by a number
arrayCutter([1, 2, 3, 4, 5, 6, 7], 4)
// returns
[
[1, 2, 3, 4],
[5, 6, 7]
]
License
MIT © EGOIST