Standalone predicate — returns true if value matches pattern, false otherwise. Same pattern language as match()/matchWalk(); no select extraction, no handler, no throw. Useful inside filters or as a cheap gate.
value
pattern
import { P, isMatching } from "matchigo";const users = [{ age: 10 }, { age: 20 }, { age: 30 }];users.filter((u) => isMatching({ age: P.gte(18) }, u));// [{ age: 20 }, { age: 30 }] Copy
import { P, isMatching } from "matchigo";const users = [{ age: 10 }, { age: 20 }, { age: 30 }];users.filter((u) => isMatching({ age: P.gte(18) }, u));// [{ age: 20 }, { age: 30 }]
Standalone predicate — returns true if
valuematchespattern, false otherwise. Same pattern language as match()/matchWalk(); no select extraction, no handler, no throw. Useful inside filters or as a cheap gate.