14 lines
489 B
JavaScript
Vendored
14 lines
489 B
JavaScript
Vendored
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.chunk = void 0;
|
|
exports.sleep = sleep;
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
BigInt.prototype.toJSON = function () {
|
|
return this.toString();
|
|
};
|
|
const chunk = (arr, size) => [...Array(Math.ceil(arr.length / size))].map((_, i) => arr.slice(size * i, size + size * i));
|
|
exports.chunk = chunk;
|
|
function sleep(ms) {
|
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
}
|