• Checks if all elements of an Iterable match a Predicate.

    Example

    const allValuesEven = every(isEven);
    const result = allValuesEven([2,4,6]);
    console.log(result); // true

    See

    filter and some for similar operations.

    Returns

    true if the Predicate returns true for all elements

    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