1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | function chunkd(array, index, total) {
|
4 | let length = array.length;
|
5 | let size = Math.floor(length / total);
|
6 | let remainder = length % total;
|
7 | let offset = Math.min(index, remainder) + index * size;
|
8 | let chunk = size + (index < remainder ? 1 : 0);
|
9 | return array.slice(offset, offset + chunk);
|
10 | }
|
11 | exports.default = chunkd;
|
12 | module.exports = chunkd;
|
13 | //# sourceMappingURL=chunkd.js.map |
\ | No newline at end of file |