lyxaira.glass 74ca844f42 Actualizacion cambios generados: seccion #12, #14 y #15. | il y a 4 ans | |
---|---|---|
.. | ||
.github | il y a 4 ans | |
test | il y a 4 ans | |
.npmignore | il y a 4 ans | |
LICENSE | il y a 4 ans | |
README.md | il y a 4 ans | |
index.js | il y a 4 ans | |
package-lock.json | il y a 4 ans | |
package.json | il y a 4 ans |
Turn any flavor of allowable package.json bin into a normalized object.
const normalize = require('npm-normalize-package-bin')
const pkg = {name: 'foo', bin: 'bar'}
console.log(normalize(pkg)) // {name:'foo', bin:{foo: 'bar'}}
Also strips out weird dots and slashes to prevent accidental and/or malicious bad behavior when the package is installed.