Files
discord-decomp/_bundle/chunk.js
T
2026-11-01 12:12:55 +02:00

27 lines
749 B
JavaScript

// Metro module 9427 (f9428).
import * as _isIterateeCall from "./isIterateeCall";
import * as _toInteger from "./toInteger_4270";
import * as _baseSlice from "./baseSlice";
const { ceil, max } = Math;
module.exports = function chunk(a0, a1, a2) {
const r15 = (a2 ? _isIterateeCall(a0, a1, a2) : a1 === void 0) ? 1 : max(_toInteger(a1), 0);
const r23 = a0 == null ? 0 : a0.length;
if (r23 && !(r15 < 1)) {
const r29 = Array(ceil(r23 / r15));
const r30 = 0 < r23;
let r31 = 0;
let r32 = 0;
if (r30) {
do {
const r33 = r31 + 1;
const r37 = r32 + r15;
r29[r31] = _baseSlice(a0, r32, r37);
r31 = r33;
r32 = r37;
} while (r32 < r23);
}
return r29;
}
return [];
};