a-split
Split an array into arrays of a specific length
Install
$ npm install --save a-split
Example
var split = ; console; // -> [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] console; // -> [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ], [ 7 ] ]
require('a-split')(list, length)
Arguments:
list
: The array to split uplength
: The maximum amount of items a partial can have
Returns: Returns an array into arrays of a specific length
License
© 2016 Vikram Jadhav. MIT License