@szilanor/stream
    Preparing search index...

    Function notNullOrEmptyAsync

    • Returns an AsyncOperationFunction that yields only the non-null / non-undefined / non-empty entries of the source Iterable.

      Type Parameters

      • T extends { length: number }

        The type of the elements in the source Iterable.

      Returns AsyncOperationFunction<T | null | undefined, NonNullable<T>>

      An AsyncOperationFunction that yields only the non-null / non-undefined / non-empty entries of the source Iterable.

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