Combines Predicates with a logical OR.
OR
The combined Predicate returns true if any of the Predicates returns true.
true
Combine two Predicates with a logical OR
const predicate = or(numberIsPositive, numberIsEven);const result = p(-2);console.log(result); // true
Returns an alwaysFalse Predicate if no args provided
const predicate = or();const result = p();console.log(result); // false
true if any of the Predicates returned true, otherwise false
false
the type of the Predicates
Rest
the Predicates to combine
Generated using TypeDoc
Combines Predicates with a logical
OR.The combined Predicate returns
trueif any of the Predicates returnstrue.Example
Combine two Predicates with a logical
ORExample
Returns an alwaysFalse Predicate if no args provided
Returns
trueif any of the Predicates returnedtrue, otherwisefalse