@szilanor/stream
    Preparing search index...

    Function bufferAsync

    • Returns an AsyncOperationFunction that yields array of entries of the source Iterable with the given length.

      Type Parameters

      • T

        The type of the elements in the source Iterable.

      Parameters

      • size: number

        The length of the array to yield.

      Returns AsyncOperationFunction<T, T[]>

      An AsyncOperationFunction that yields array of entries of the source Iterable with the given length.

      const result = bufferAsync<number>([1, 2, 3], 2);
      console.log(result); // [[1, 2], [3]]