📅  最后修改于: 2022-03-11 15:03:21.888000             🧑  作者: Mango
function __chunk(array, size) {
let chunkArray = [];
return function _chunk(chunk = array) {
if (chunk.length < size) {
return chunkArray.push(chunk) && chunkArray;
}
return chunkArray.push(chunk.slice(0, size)) && _chunk(chunk.slice(size));
};
}