Call the first function whichs condition is true.
npm install fj-cond --save
var cond = require('fj-cond');
let eq = (x) => (y) => x === y;
cond([
[eq(1), assert.fail],
[eq(2), assert.fail],
[eq(3), (x) => console.log(x)],
[T, assert.fail]
])(3));