UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

12 lines (8 loc) 190 B
import { curry } from './curry.js' function whenFn( predicate, whenTrueFn, input ){ if (!predicate(input)) return input return whenTrueFn(input) } export const when = curry(whenFn)