You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
exports = function(arr, size) { |
|
var ret = []; |
|
size = size || 1; |
|
for (var i = 0, len = Math.ceil(arr.length / size); i < len; i++) { |
|
var start = i * size; |
|
var end = start + size; |
|
ret.push(arr.slice(start, end)); |
|
} |
|
return ret; |
|
}; |
|
|
|
module.exports = exports;
|
|
|