Skip to main content

orFn()

orFn<T, A>(a): <B>(b) => (c) => boolean

Logical (Function Result) Disjunction (a(x) || b(x)).

Type Parameters

T

The type of the input value of the functions.

A

The return type of the first function.

Parameters

a

(x) => A

The function to get the, possibly falsey, return of.

Returns

Function

Type Parameters

B

Parameters

b

(y) => B

Returns

Function

Parameters

c

T

Returns

boolean

See

https://en.wikipedia.org/wiki/Logical_disjunction

Remarks

pure function

Example

orFn(s => s.trim())(s => s.trimEnd())('foo bar ');
// true