{"name":"is-npm","version":"6.1.0","description":"Check if your code is running as an npm script","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-npm.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","types":"./index.d.ts","sideEffects":false,"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["npm","yarn","pnpm","bun","is","check","detect","env","environment","run","script","package-manager"],"devDependencies":{"ava":"^3.15.0","tsd":"^0.17.0","xo":"^0.44.0"},"_id":"is-npm@6.1.0","gitHead":"7c8169f06cf1e20b3806b9ade57757c89f276e0c","bugs":{"url":"https://github.com/sindresorhus/is-npm/issues"},"homepage":"https://github.com/sindresorhus/is-npm#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-O2z4/kNgyjhQwVR1Wpkbfc19JIhggF97NZNCpWTnjH7kVcZMUrnut9XSN7txI7VdyIYk5ZatOq3zvSuWpU8hoA==","shasum":"f70e0b6c132dfc817ac97d3badc0134945b098d3","tarball":"http://registry-npm.ywwl.com/is-npm/download/is-npm-6.1.0.tgz","fileCount":5,"unpackedSize":7816,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDE9OKzhg49SUvuZN5C8ARz4aw5uYmTcIA2jvuIna9J2QIgDTE7qZb+IgbcxwRK22cuDwOVXiuD/KgEX/TjimLsu00="}],"size":2207,"noattachment":false,"key":"/is-npm/-/is-npm-6.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/is-npm_6.1.0_1757524537539_0.6954833602644663"},"_hasShrinkwrap":false,"readme":"# is-npm\n\n> Check if your code is running as an [npm](https://docs.npmjs.com/misc/scripts), [yarn](https://yarnpkg.com/cli/run), [pnpm](https://pnpm.io), or [bun](https://bun.sh) script\n\n## Install\n\n```sh\nnpm install is-npm\n```\n\n## Usage\n\n```js\nimport {isPackageManager, isNpm, isYarn, isPnpm, isBun} from 'is-npm';\n\nconsole.table({isPackageManager, isNpm, isYarn, isPnpm, isBun});\n```\n\n```sh\n$ node foo.js\n# ┌──────────────────┬────────┐\n# │     (index)      │ Values │\n# ├──────────────────┼────────┤\n# │ isPackageManager │ false  │\n# │      isNpm       │ false  │\n# │     isYarn       │ false  │\n# │     isPnpm       │ false  │\n# │      isBun       │ false  │\n# └──────────────────┴────────┘\n$ npm run foo\n# ┌──────────────────┬────────┐\n# │     (index)      │ Values │\n# ├──────────────────┼────────┤\n# │ isPackageManager │ true   │\n# │      isNpm       │ true   │\n# │     isYarn       │ false  │\n# │     isPnpm       │ false  │\n# │      isBun       │ false  │\n# └──────────────────┴────────┘\n$ yarn run foo\n# ┌──────────────────┬────────┐\n# │     (index)      │ Values │\n# ├──────────────────┼────────┤\n# │ isPackageManager │ true   │\n# │      isNpm       │ false  │\n# │     isYarn       │ true   │\n# │     isPnpm       │ false  │\n# │      isBun       │ false  │\n# └──────────────────┴────────┘\n$ pnpm run foo\n# ┌──────────────────┬────────┐\n# │     (index)      │ Values │\n# ├──────────────────┼────────┤\n# │ isPackageManager │ true   │\n# │      isNpm       │ false  │\n# │     isYarn       │ false  │\n# │     isPnpm       │ true   │\n# │      isBun       │ false  │\n# └──────────────────┴────────┘\n$ bun run foo\n# ┌──────────────────┬────────┐\n# │     (index)      │ Values │\n# ├──────────────────┼────────┤\n# │ isPackageManager │ true   │\n# │      isNpm       │ false  │\n# │     isYarn       │ false  │\n# │     isPnpm       │ false  │\n# │      isBun       │ true   │\n# └──────────────────┴────────┘\n```\n\n## API\n\n### isNpm\n\nCheck if your code is running as an [npm](https://docs.npmjs.com/misc/scripts) script.\n\n### isYarn\n\nCheck if your code is running as a [yarn](https://yarnpkg.com/cli/run) script.\n\n### isPnpm\n\nCheck if your code is running as a [pnpm](https://pnpm.io) script.\n\n### isBun\n\nCheck if your code is running as a [bun](https://bun.sh) script.\n\n### isPackageManager\n\nCheck if your code is running as a package manager script (npm, yarn, pnpm, or bun).\n\n### isNpmOrYarn *(deprecated)*\n\nCheck if your code is running as an [npm](https://docs.npmjs.com/misc/scripts) or [yarn](https://yarnpkg.com/cli/run) script.\n\n**Use `isPackageManager` instead** for detecting any package manager.\n\n## Related\n\n- [is-npm-cli](https://github.com/sindresorhus/is-npm-cli) - CLI for this module\n","publish_time":1757524537721,"_cnpm_publish_time":1757524537721,"dist-tags":{"latest":"6.1.0"}}