ts-iterable-functions
    Preparing search index...

    Function someConst

    • Determines whether any element of the source iterable satisfies the optional predicate.

      Curried version of _some.

      Type Parameters

      • T

        Element type produced by the source iterable.

      Parameters

      • pred: IndexedPredicate<T> = ...

        Predicate receiving each element and its index; defaults to a predicate that always returns true.

      Returns (src: Iterable) => boolean

      true when pred returns truthy for any element, otherwise false.

      Error Rethrows any error thrown by pred.

      const hasEven = _some([1, 3, 4], (value) => value % 2 === 0);
      console.log(hasEven); // true

      or using the curried version:

      const hasEven = pipeInto(
      [1, 3, 4],
      some((value) => value % 2 === 0)
      );
      console.log(hasEven); // true