node/deps/npm/node_modules/npm-normalize-package-bin
Myles Borins 2e54524955
deps: update npm to 7.0.0-rc.3
PR-URL: https://github.com/nodejs/node/pull/35474
Reviewed-By: Ruy Adorno <ruyadorno@github.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-10-07 09:59:49 -04:00
..
.github deps: update npm to 6.13.4 2019-12-12 06:55:20 -05:00
test deps: update npm to 6.13.4 2019-12-12 06:55:20 -05:00
.npmignore deps: update npm to 6.13.4 2019-12-12 06:55:20 -05:00
index.js deps: update npm to 6.13.4 2019-12-12 06:55:20 -05:00
LICENSE deps: update npm to 6.13.4 2019-12-12 06:55:20 -05:00
package.json deps: update npm to 7.0.0-rc.3 2020-10-07 09:59:49 -04:00
README.md deps: update npm to 6.13.4 2019-12-12 06:55:20 -05: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.