thedesk/app/node_modules/is-npm
2019-09-12 23:38:13 +09:00
..
index.d.ts Add: node_modules 2019-09-12 23:38:13 +09:00
index.js Add: node_modules 2019-09-12 23:38:13 +09:00
license Add: node_modules 2019-09-12 23:38:13 +09:00
package.json Add: node_modules 2019-09-12 23:38:13 +09:00
readme.md Add: node_modules 2019-09-12 23:38:13 +09:00

is-npm Build Status

Check if your code is running as an npm or yarn script

Install

$ npm install is-npm

Usage

const {isNpm} = require('is-npm');

console.log(isNpm);
$ node foo.js
#=> false
$ npm run foo
#=> true
$ yarn run foo
#=> true

License

MIT © Sindre Sorhus