ixfx
    Preparing search index...

    Function chunks

    Breaks an iterable into array chunks

    Streaming: works with infinite iterables.

    chunks([1,2,3,4,5,6,7,8,9,10], 3);
    // Yields [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10]]
    • Type Parameters

      • V

      Parameters

      • it: Iterable<V>
      • size: number

      Returns Generator<V[]>

    • Type Parameters

      • V

      Parameters

      • it: AsyncIterable<V>
      • size: number

      Returns AsyncGenerator<V[]>