Skip to main content
Module

x/rimbu/mod.ts>AsyncReducer.containsSlice

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

Returns an AsyncReducer that returns true if the input values contain the given slice sequence amount times. Otherwise, returns false.

Parameters

  • a async sequence of elements to match against
optional
options: { eq?: Eq<T> | undefined; amount?: number | undefined; } = [UNSUPPORTED]
  • (optional) an object containing the following properties:
  • amount: (detaulf: 1) the amount of elements to find
  • eq: (default: Eq.objectIs) the Eq instance to use to compare elements