Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
index.js | D | 12-May-2024 | 147 | 5 | 4 | |
package.json | D | 12-May-2024 | 1.5 KiB | 65 | 64 | |
readme.md | D | 12-May-2024 | 477 | 31 | 19 |
readme.md
1# is-npm [](https://travis-ci.org/sindresorhus/is-npm) 2 3> Check if your code is running as an [npm script](https://www.npmjs.org/doc/misc/npm-scripts.html) 4 5 6## Install 7 8```sh 9$ npm install --save is-npm 10``` 11 12 13## Usage 14 15```js 16var isNpm = require('is-npm'); 17console.log(isNpm); 18``` 19 20```sh 21$ node foo.js 22#=> false 23$ npm run foo 24#=> true 25``` 26 27 28## License 29 30MIT © [Sindre Sorhus](http://sindresorhus.com) 31