Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
.github/ | 12-May-2024 | - | 3 | 2 | ||
test/ | 12-May-2024 | - | 254 | 224 | ||
.npmignore | D | 12-May-2024 | 282 | 25 | 23 | |
LICENSE | D | 12-May-2024 | 739 | 16 | 12 | |
README.md | D | 12-May-2024 | 398 | 15 | 10 | |
index.js | D | 12-May-2024 | 1.3 KiB | 61 | 46 | |
package-lock.json | D | 12-May-2024 | 117.3 KiB | 3,530 | 3,529 | |
package.json | D | 12-May-2024 | 1.7 KiB | 58 | 57 |
README.md
1# npm-normalize-package-bin 2 3Turn any flavor of allowable package.json bin into a normalized object. 4 5## API 6 7```js 8const normalize = require('npm-normalize-package-bin') 9const pkg = {name: 'foo', bin: 'bar'} 10console.log(normalize(pkg)) // {name:'foo', bin:{foo: 'bar'}} 11``` 12 13Also strips out weird dots and slashes to prevent accidental and/or 14malicious bad behavior when the package is installed. 15