• Checks if any element of an Iterable matches a Predicate.

    Example

    Is any value even?

    const anyValueEven = some(x => x % 2);
    const result = anyValueEven([1,2,3]);
    console.log(result); // true

    See

    every and filter for similar operations.

    Returns

    true if the Predicate returns true for any element

    Type Parameters

    • T

      the Iterable value type

    Parameters

    • predicate: Predicate<[T]>

      the Predicate to match

    Returns ((iterable: Iterable<T>) => boolean)

      • (iterable: Iterable<T>): boolean
      • Parameters

        Returns boolean

Generated using TypeDoc