• Home
Name
Date
Size
#Lines
LOC

..--

index.jsD12-May-2024147 54

package.jsonD12-May-20241.5 KiB6564

readme.mdD12-May-2024477 3119

readme.md

1# is-npm [![Build Status](https://travis-ci.org/sindresorhus/is-npm.svg?branch=master)](https://travis-ci.org/sindresorhus/is-npm)
2
3> Check if your code is running as an [npm script](https://www.npmjs.org/doc/misc/npm-scripts.html)
4
5
6## Install
7
8```sh
9$ npm install --save is-npm
10```
11
12
13## Usage
14
15```js
16var isNpm = require('is-npm');
17console.log(isNpm);
18```
19
20```sh
21$ node foo.js
22#=> false
23$ npm run foo
24#=> true
25```
26
27
28## License
29
30MIT © [Sindre Sorhus](http://sindresorhus.com)
31