Skip to main content
Module

x/rimbu/mod.ts>AsyncReducer.some

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

Returns an AsyncReducer that ouputs false as long as no input value satisfies given pred, true otherwise.

Parameters

pred: (value: T, index: number) => MaybePromise<boolean>
  • a potentiall 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