@szilanor/stream
    Preparing search index...

    Function takeWhileAsync

    • Returns an AsyncOperationFunction that takes entries of the source Iterable while the parameter function returns true.

      Type Parameters

      • T

        The type of the elements in the source Iterable.

      Parameters

      Returns AsyncOperationFunction<T, T>

      An AsyncOperationFunction that takes entries of the source Iterable while the parameter function returns true.

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