Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 778 Bytes

readme.md

File metadata and controls

25 lines (14 loc) · 778 Bytes

iif

The IIf function in Javascript

npm Build Status Coverage Status

Usage

iif(condition, ifTrue, [ifFalse])

var iif = require('iif')

Returns ifTrue if condition is truthy. Otherwise, returns ifFalse.

iifBranch(condition, ifTrueFunc, [ifFalseFunc])

var iif = require('iif/branch')

Same as above, but additionally calls the argument being returned if it's a function.

License

CC0-1.0