Predicate50
Models
Guards
hasPropertyconstChecks whether a value has a given property key.isBigIntfunctionChecks whether a value is a bigint.isBooleanfunctionChecks whether a value is a boolean.isDatefunctionChecks whether a value is a Date.isErrorfunctionChecks whether a value is an Error.isFunctionfunctionChecks whether a value is a function.isIterablefunctionChecks whether a value is iterable.isMapfunctionChecks whether a value is a Map.isNeverfunctionType guard that always returns false.isNotNullfunctionChecks whether a value is not null.isNotNullishfunctionChecks whether a value is not null and not undefined.isNotUndefinedfunctionChecks whether a value is not undefined.isNullfunctionChecks whether a value is null.isNullishfunctionChecks whether a value is null or undefined.isNumberfunctionChecks whether a value is a number.isObjectfunctionChecks whether a value is a non-null object value that is not an array.isObjectKeywordfunctionChecks whether a value is an object in the JavaScript sense (objects, arrays, functions).isObjectOrArrayfunctionChecks whether a value is an object or an array (non-null object).isPromisefunctionChecks whether a value is a Promise-like object with then and catch.isPromiseLikefunctionChecks whether a value is PromiseLike (has a then method).isPropertyKeyfunctionChecks whether a value is a valid PropertyKey (string, number, or symbol).isReadonlyObjectfunctionChecks whether a value is a non-null, non-array object and narrows it to a readonly indexable object type.isRegExpfunctionChecks whether a value is a RegExp.isSetfunctionChecks whether a value is a Set.isStringfunctionChecks whether a value is a string.isSymbolfunctionChecks whether a value is a symbol.isTaggedconstChecks whether a value has a _tag property equal to the given tag.isTruthyfunctionChecks whether a value is truthy.isTupleOfconstChecks whether a readonly array has exactly n elements.isTupleOfAtLeastconstChecks whether a readonly array has at least n elements.isUint8ArrayfunctionChecks whether a value is a Uint8Array.isUndefinedfunctionChecks whether a value is undefined.isUnknownfunctionType guard that always returns true.Elements
Combinators
andconstCreates a predicate that returns true only if both predicates are true.composeconstComposes two predicates or refinements into one.eqvconstCreates a predicate that returns true when both predicates agree.impliesconstCreates a predicate representing logical implication: if antecedent, then consequent.mapInputconstTransforms the input of a predicate using a mapping function.nandconstCreates a predicate that returns true unless both predicates are true.norconstCreates a predicate that returns true when neither predicate is true.notfunctionNegates a predicate.orconstCreates a predicate that returns true if either predicate is true.StructfunctionCreates a predicate for objects by applying predicates to named properties.TuplefunctionCreates a predicate for tuples by applying predicates to each element.xorconstCreates a predicate that returns true if exactly one predicate is true.