From 383285ecd5292bf9a825e05904955b937de84cc9 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sat, 4 Jun 2022 08:51:01 +0200 Subject: Initial commit --- node_modules/is-npm/readme.md | 60 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 node_modules/is-npm/readme.md (limited to 'node_modules/is-npm/readme.md') diff --git a/node_modules/is-npm/readme.md b/node_modules/is-npm/readme.md new file mode 100644 index 0000000..b18ba10 --- /dev/null +++ b/node_modules/is-npm/readme.md @@ -0,0 +1,60 @@ +# is-npm [![Build Status](https://travis-ci.com/sindresorhus/is-npm.svg?branch=master)](https://travis-ci.com/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 │ +# └─────────────┴────────┘ +``` + +## Related + +- [is-npm-cli](https://github.com/sindresorhus/is-npm-cli) - CLI for this module + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
-- cgit