node-cond
Install
npm install node-cond
Usage
var cond = ;/* cond( condition1, Then1, condition2, Then2, ... conditionN, ThenN, [defaultThen] )*/ // ternary operator emulationvar test = ;// now test equal "t" // usind functionvar test = ;// test still equal "t"// if Then is function it will be called with condition as arg var test =
cond.all
cond.all exec all Then after truthy conditionals and return the last. If default Then is defined it will be returned
cond.doif
condconditional