UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

9 lines (7 loc) 257 B
export function either(firstPredicate, secondPredicate){ if (arguments.length === 1){ return _secondPredicate => either(firstPredicate, _secondPredicate) } return (...input) => Boolean(firstPredicate(...input) || secondPredicate(...input)) }