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

    Function some

    • Creates a sink checking if any item 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, boolean>

      A sink that checks if any item satisfies the predicate

      await items([1, 2, 3, 4, 5])(some(x => x > 3));  // true
      await items([1, 2, 3])(some(x => x > 5)); // false