Split an array into arrays of a specific length
Install
$ npm install --save split-array
Usage
var splitArray = ; ;//=> [['a', 'b'], ['c', 'd'], ['e', 'f']] ;//=> [['a', 'b', 'c'], ['d', 'e', 'f'], ['foo']]
API
splitArray(array, maxLength)
array
Required
Type: array
The array to split up.
maxLength
Required
Type: number
The maximum amount of items a partial can have
License
MIT © Arthur Verschaeve