summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/is-npm/readme.md
blob: 84833ec65b3bdcd042388a16b7533cc51ea6f83d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# is-npm [![Build Status](https://travis-ci.org/sindresorhus/is-npm.svg?branch=master)](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)