seangenabe / iif

The IIf function in Javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

The IIf function in Javascript


Languages

Language:JavaScript 100.0%