* Fix workflow * Trigger * [auto] Update compiled version * [auto] Commit modules * Push Windows changes * Fix * [auto] Update compiled version * Try removing cwd * [auto] Update compiled version * Try with path module * [auto] Update compiled version * Fix path * [auto] Update compiled version * Use raw path * [auto] Update compiled version * Other path * [auto] Update compiled version * Avoid @action/exec * [auto] Update compiled version * test * [auto] Update compiled version * test * [auto] Update compiled version * test * [auto] Update compiled version * test * [auto] Update compiled version * Try with shelljs * [auto] Update compiled version * Fix my stupidity * Copy scripts to local dir * [auto] Update compiled version * Still use path * [auto] Update compiled version * Delete entrypoint.sh * [auto] Update compiled version * Make file executable * [auto] Update compiled version * Try using bash * [auto] Update compiled version
31 lines
477 B
Markdown
31 lines
477 B
Markdown
# is-npm [](https://travis-ci.org/sindresorhus/is-npm)
|
|
|
|
> Check if your code is running as an [npm script](https://www.npmjs.org/doc/misc/npm-scripts.html)
|
|
|
|
|
|
## Install
|
|
|
|
```sh
|
|
$ npm install --save is-npm
|
|
```
|
|
|
|
|
|
## Usage
|
|
|
|
```js
|
|
var isNpm = require('is-npm');
|
|
console.log(isNpm);
|
|
```
|
|
|
|
```sh
|
|
$ node foo.js
|
|
#=> false
|
|
$ npm run foo
|
|
#=> true
|
|
```
|
|
|
|
|
|
## License
|
|
|
|
MIT © [Sindre Sorhus](http://sindresorhus.com)
|