Splits array into specified number of chunks

  • Type Parameters

    • T

    Parameters

    • n: number

      Number of chunks

    • xs: T[]

      Array to split

    Returns T[][]

    Array of n chunks