Skip to main content
Module

x/rambda/when.js

Faster and smaller alternative to Ramda
Go to Latest
File
import { curry } from './curry'
function whenFn( predicate, whenTrueFn, input){ if (!predicate(input)) return input
return whenTrueFn(input)}
export const when = curry(whenFn)