Preparing search index...

    Function chunkArray

    • Splits items into consecutive chunks of at most chunkSize elements.

      Type Parameters

      • T

        Element type

      Parameters

      • items: readonly T[]

        Source array (not mutated)

      • chunkSize: number = DEFAULT_CHUNK_SIZE

        Maximum chunk length; must be a positive integer. Defaults to DEFAULT_CHUNK_SIZE

      Returns T[][]

      Array of chunks preserving original order

      RangeError if chunkSize is not a positive integer