Skip to main content
Module

x/rimbu/mod.ts>Match.none

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

Returns a matcher that returns true if none of given matchItem matches the given value.

Examples

Example 1

const input = { a: 1, b: { c: true, d: 'a' } }
match(input, Match.none({ a: 5, { c: true } } )) // => false
match(input, Match.none({ a: 5, { c: false } } )) // => true

Type Parameters

T
R
optional
Q extends T = T

Parameters

...matchItems: Match.Options<Q, R>[]
  • the match specifications to test

Returns

None<T, R, Q>