conditionals
v0.1.6
Published
a fancy, functional switch-case-like utility.
Downloads
5
Readme
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()
)