1.0.2 • Published 7 years ago

literal-switch v1.0.2

Weekly downloads
8
License
ISC
Repository
github
Last release
7 years ago

description

Use literal object like switch function.

install

$ npm i --save literal-switch

usage

var Switch = require('literal-switch')

var nb = Switch({
    One: function() { return 'One' },
    Two: function() { return 'Two' },
    Three: function() { return 'Three' }
}, 'Two')

console.log(nb)