Function arrChunks

  • Splits a parent array into smaller chunks

    Example

    arrChunks([1, 2, 3, 4], 2);
    => [[1, 2], [3, 4]]

    Type Parameters

    • Type extends unknown[]

    Parameters

    • a: Type

      An array

    • size: number

      Individual chunk size

    Returns Type[]

Generated using TypeDoc