UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

8 lines (6 loc) 201 B
export function unless(predicate, whenFalse){ if (arguments.length === 1){ return _whenFalse => unless(predicate, _whenFalse) } return input => predicate(input) ? input : whenFalse(input) }