Ternary in a function, but performant through closure science
$ npm install --save iffy
var iffy =// => onTrue called// => onFalse called
iffy(condition, onTrue, [onFalse]) ->
If condition is truthy, onTrue will be called and its return value returned.
Otherwise, if onFalse is provided, it will be called and its return value returned.
These are similar, but are less performant due to lack of closure science.
MIT © Andrew Joslin