@szilanor/stream
    Preparing search index...

    Function arrayFilter

    • Returns an OperationFunction that yields only array entries of the source Iterable that satisfy the function.

      Type Parameters

      • T

        The type of the elements in the source Iterable.

      Parameters

      • predicate: (entry: T, index: number) => boolean

        The function to use to filter the entries.

      Returns OperationFunction<T[], T[]>

      An OperationFunction that yields only array entries of the source Iterable that satisfy the function.

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