@metreeca/pipe - v0.9.11
    Preparing search index...

    Function find

    • Creates a sink retrieving the first item that satisfies the predicate.

      Type Parameters

      • V

        The type of items in the stream

      Parameters

      • predicate: (item: V) => boolean | Promise<boolean>

        The function to test each item

      Returns Sink<V, V | undefined>

      A sink that retrieves the first matching item or undefined