Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/stream/async/async-reducer.ts>AsyncReducer.every

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function AsyncReducer.every
import { AsyncReducer } from "https://deno.land/x/rimbu@1.2.1/stream/async/async-reducer.ts";
const { every } = AsyncReducer;

Returns an AsyncReducer that ouputs true as long as all input values satisfy the given pred, false otherwise.

Parameters

pred: (value: T, index: number) => MaybePromise<boolean>
  • a potentially async function taking an input value and its index, and returning true if the value satisfies the predicate
optional
options: { negate?: boolean | undefined; } = [UNSUPPORTED]
  • (optional) an object containing the following properties:
  • negate: (default: false) when true will invert the given predicate