unless
unless<
A,B>(predicate,onFalse): (value) =>A|B
Defined in: Composition/unless.ts:20
Executes a function on the piped value if a predicate is NOT met, otherwise returns the value unchanged.
Type Parameters
Section titled “Type Parameters”A
B = A
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(value) => boolean
onFalse
Section titled “onFalse”(value) => B
Returns
Section titled “Returns”(value) => A | B
Example
Section titled “Example”when for executing when a predicate is met