Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 20-Sep-2020 | - | ||||
package.json | H A D | 20-Sep-2020 | 1.4 KiB | 64 | 63 | |
readme.md | H A D | 26-Oct-1985 | 477 | 31 | 19 |
readme.md
1# is-npm [![Build Status](https://travis-ci.org/sindresorhus/is-npm.svg?branch=master)](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