initial status
This commit is contained in:
59
node_modules/is-npm/readme.md
generated
vendored
Normal file
59
node_modules/is-npm/readme.md
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
# is-npm [](https://travis-ci.org/sindresorhus/is-npm)
|
||||
|
||||
> Check if your code is running as an [npm](https://docs.npmjs.com/misc/scripts) or [yarn](https://yarnpkg.com/lang/en/docs/cli/run/) script
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install is-npm
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const {isNpmOrYarn, isNpm, isYarn} = require('is-npm');
|
||||
|
||||
console.table({isNpmOrYarn, isNpm, isYarn});
|
||||
```
|
||||
|
||||
```sh
|
||||
$ node foo.js
|
||||
# ┌─────────────┬────────┐
|
||||
# │ (index) │ Values │
|
||||
# ├─────────────┼────────┤
|
||||
# │ isNpmOrYarn │ false │
|
||||
# │ isNpm │ false │
|
||||
# │ isYarn │ false │
|
||||
# └─────────────┴────────┘
|
||||
$ npm run foo
|
||||
# ┌─────────────┬────────┐
|
||||
# │ (index) │ Values │
|
||||
# ├─────────────┼────────┤
|
||||
# │ isNpmOrYarn │ true │
|
||||
# │ isNpm │ true │
|
||||
# │ isYarn │ false │
|
||||
# └─────────────┴────────┘
|
||||
$ yarn run foo
|
||||
# ┌─────────────┬────────┐
|
||||
# │ (index) │ Values │
|
||||
# ├─────────────┼────────┤
|
||||
# │ isNpmOrYarn │ true │
|
||||
# │ isNpm │ false │
|
||||
# │ isYarn │ true │
|
||||
# └─────────────┴────────┘
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-is-npm?utm_source=npm-is-npm&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
||||
</b>
|
||||
<br>
|
||||
<sub>
|
||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||
</sub>
|
||||
</div>
|
Reference in New Issue
Block a user