• Chunks an array into smaller arrays of a specified size.

    Type Parameters

    • T

      The type of elements in the array.

    Parameters

    • raw: T[]

      The original array to be chunked.

    • chunkSize: number

      The size of each chunk.

    Returns T[][]

    • An array of smaller arrays, each containing elements from the original array.