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
GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing github.com — nodejs-sample/node_modules/is-npm at master · jinn-dev/nodejs-sample Expand file tree/ Copy pathis-npm/Directory actionsMore optionsMore optionsDirectory actionsMore optionsMore options/ Copy pathis-npm/Folders and files
readme.mdOutline
$ npm install --save is-npm var isNpm = require('is-npm'); console.log(isNpm); $ node foo.js #=> false $ npm run foo #=> true MIT © Sindre Sorhus | ||||||||||||||||||||||||||
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | ||||||||||||||||||||||||||