Weaponized packages?!
var weapon = require('weapon');
console.log( weapon(0) ); // 0
console.log( weapon(1) ); // 1
// special feature: also works with non-numeric input
console.log( weapon('s') ); // s
With npm do:
$ npm install weapon
Contributions are welcome, however PRs that are mostly stylistic or semantic in nature will not be accepted.
GPLv3