Last change
on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
398 bytes
|
Line | |
---|
1 | # npm-normalize-package-bin
|
---|
2 |
|
---|
3 | Turn any flavor of allowable package.json bin into a normalized object.
|
---|
4 |
|
---|
5 | ## API
|
---|
6 |
|
---|
7 | ```js
|
---|
8 | const normalize = require('npm-normalize-package-bin')
|
---|
9 | const pkg = {name: 'foo', bin: 'bar'}
|
---|
10 | console.log(normalize(pkg)) // {name:'foo', bin:{foo: 'bar'}}
|
---|
11 | ```
|
---|
12 |
|
---|
13 | Also strips out weird dots and slashes to prevent accidental and/or
|
---|
14 | malicious bad behavior when the package is installed.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.