literal-switch
v1.0.2
Published
Use literal object like switch function
Downloads
2
Readme
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)