literal-switch

1.0.2 • Public • Published

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)

Readme

Keywords

Package Sidebar

Install

npm i literal-switch

Weekly Downloads

1

Version

1.0.2

License

ISC

Last publish

Collaborators

  • clementkerneur