@szilanor/stream
    Preparing search index...

    Variable everyConst

    every: <T>(predicate: PredicateFunction<T>) => CollectorFunction<T, boolean> = all

    Type declaration

      • <T>(predicate: PredicateFunction<T>): CollectorFunction<T, boolean>
      • Checks if all elements in the source satisfy 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 all elements in the source satisfy the predicate.

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