MOOver.js/node_modules/npm-normalize-package-bin
2022-02-18 13:54:33 +01:00
..
.github Added MongoDB 2022-02-18 13:54:33 +01:00
test Added MongoDB 2022-02-18 13:54:33 +01:00
.npmignore Added MongoDB 2022-02-18 13:54:33 +01:00
index.js Added MongoDB 2022-02-18 13:54:33 +01:00
LICENSE Added MongoDB 2022-02-18 13:54:33 +01:00
package-lock.json Added MongoDB 2022-02-18 13:54:33 +01:00
package.json Added MongoDB 2022-02-18 13:54:33 +01:00
README.md Added MongoDB 2022-02-18 13:54:33 +01:00

npm-normalize-package-bin

Turn any flavor of allowable package.json bin into a normalized object.

API

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.