• Checks if any element in the source satisfies the predicate.

    Type Parameters

    • T

      Type of items in the source.

    Parameters

    • predicate: PredicateFunction<T> = ...

      Predicate function to determine if an element satisfies a condition.

    Returns CollectorFunction<T, boolean>

    Collector that checks if any element in the source satisfies the predicate.

    const result = any<number>((x) => x > 2)([1, 2, 3]);
    console.log(result); // true