Checks if every element in an input iterable satisfies a given predicate function. Returns a Promise of a boolean value.
A function that accepts an input iterable and returns a Promise of a boolean value.
const input = [2, 4, 6];const isEven = (x: number) => x % 2 === 0;const everyResult = await every<number>(isEven)(input);console.log(everyResult); // Logs true
The type of elements in the input iterable.
An async predicate function to test each element of the input iterable.
Generated using TypeDoc
Checks if every element in an input iterable satisfies a given predicate function. Returns a Promise of a boolean value.
Returns
A function that accepts an input iterable and returns a Promise of a boolean value.
Example