Function chunk

  • Break array into chunks of given size.

    Type Parameters

    • T

    Parameters

    • x: T[]

      an array

    • n: number = 1

      chunk size [1]

    • s: number = n

      chunk step [n]

    Returns T[][]

    x[0..n] ⧺ x[s..s+n] ⧺ x[2s..2s+n] ⧺ ...

Generated using TypeDoc