/**
 * Splits an array into chunks of a specified size.
 *
 * @template T - The type of elements in the array.
 * @param {T[]} arr - The array to be split into chunks.
 * @param {number} chunkSize - The size of each chunk.
 * @returns {T[][]} - A new array containing the chunks.
 */
export const splitArrayIntoChunks = (arr, chunkSize) => {
    const array = [];
    for (let i = 0; i < arr.length; i += chunkSize) {
        const chunk = arr.slice(i, i + chunkSize);
        array.push(chunk);
    }
    return array;
};
/**
 * Generates an array of numbers from 0 to a specified length.
 *
 * @param {number} length - The length of the array to be generated.
 * @returns {number[]} - An array of numbers from 0 to length - 1.
 */
export const range = (length) => Array.from({ length }, (_, i) => i);
//# sourceMappingURL=array.js.map