Consumes the iterator into true if predicate holds true for every item in the sequence.
import { pipe } from "yta";import { every, of } from "yta/sync";pipe( of(2, 4, 6), every((n) => n % 2 === 0),);// => truepipe( of("foo", "bar", "baz"), every((str) => str.startsWith("b")),);// => falsepipe( of(), every(() => false),);// => true Copy
import { pipe } from "yta";import { every, of } from "yta/sync";pipe( of(2, 4, 6), every((n) => n % 2 === 0),);// => truepipe( of("foo", "bar", "baz"), every((str) => str.startsWith("b")),);// => falsepipe( of(), every(() => false),);// => true
See also:
The predicate function
Consumes the iterator into true if predicate holds true for every item in the sequence.
See also: