0.1.6 • Published 8 years ago

conditionals v0.1.6

Weekly downloads
-
License
ISC
Repository
-
Last release
8 years ago

cond()

a fancy, functional switch-case-like utility.

Example:

getContent = cond(
   [x => typeof x === 'undefined', getForm],
   [x => x === 'success', getSuccess],
   [x => x === 'failure', getFailure],
   [x => x === 'sending', getSending],
   getDefault()
 )