ts-iterable-functions
    Preparing search index...

    Function allConst

    • Determines whether every element in the source iterable satisfies the predicate.

      Curried version of _all.

      Type Parameters

      • T

        Element type produced by the source iterable.

      Parameters

      • pred: IndexedPredicate<T>

        Predicate receiving each element and its index; must return true for all elements.

      Returns (src: Iterable) => boolean

      true when every invocation of pred returns truthy; otherwise false.

      Error Rethrows any error thrown by pred.

      const allEven = _every([2, 4, 6], (value) => value % 2 === 0);
      console.log(allEven); // true

      or using the curried version:

      const allEven = pipeInto([2, 4, 6], every((value) => value % 2 === 0));
      console.log(allEven); // true