tahamajs's picture
download
raw
370 Bytes
import { slice } from './_setup.js';
// Chunk a single array into multiple arrays, each containing `count` or fewer
// items.
export default function chunk(array, count) {
if (count == null || count < 1) return [];
var result = [];
var i = 0, length = array.length;
while (i < length) {
result.push(slice.call(array, i, i += count));
}
return result;
}

Xet Storage Details

Size:
370 Bytes
·
Xet hash:
b3e29a210ff559adae797c90155eedffee8152f73d7f2f6ed489421386df0a35

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.