conditionals

0.1.6 • Public • Published

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()
 )

Readme

Keywords

none

Package Sidebar

Install

npm i conditionals

Weekly Downloads

4

Version

0.1.6

License

ISC

Last publish

Collaborators

  • mosho