switcher-statement
v1.0.0
Published
Js switcher statement
Downloads
6
Readme
var switcher = require("switcher-statement")
switcher(1)
.case(1, (_break) => {
console.log('one')
_break()
})
.case("2", (_break) => {
console.log('two')
_break()
})
.default(() => {
console.log('not one or two')
})
.end()
outputs:
one