cond
Lisp inspired conditional construct (COND) in Javascript.
COND is a function which takes an arbitrary number clauses. Each clause contains a list of two expressions. First expression is a condition (or predicate) and the second is the result. Each clause is ran in order, immediately returning the result where the condition is truthy.
Install
npm install conds
bower install conds
Usage
const cond = ; const fn = ; console; // 'Water freezes at 0°C'console; // 'Nothing special happens at 50°C'console; // 'Water boils at 100°C'
Test
npm test
License
MIT