is-npm
Check if your code is running as an npm script
Install
$ npm install --save is-npm
Usage
var isNpm = require('is-npm');
console.log(isNpm);
$ node foo.js
#=> false
$ npm run foo
#=> true
License
MIT © Sindre Sorhus
Name |
Last Commit
87e1e3af
–
node modules
|
History
|
Last Update |
---|---|---|
.. | ||
index.js | Loading commit data... | |
package.json | Loading commit data... | |
readme.md | Loading commit data... |
Check if your code is running as an npm script
$ npm install --save is-npm
var isNpm = require('is-npm');
console.log(isNpm);
$ node foo.js
#=> false
$ npm run foo
#=> true
MIT © Sindre Sorhus