{"name":"@isaacs/which","description":"Like which(1) unix command. Find the first instance of an executable in the PATH.","version":"7.0.4","type":"module","tshy":{"selfLink":false,"exports":{"./raw":"./src/index.ts","./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}}},"exports":{"./raw":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"main":"./dist/commonjs/index.min.js","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.min.js","repository":{"type":"git","url":"git+https://github.com/isaacs/which.git"},"license":"ISC","dependencies":{"isexe":"^4.0.0"},"devDependencies":{"esbuild":"^0.27.3","prettier":"^3.8.1","tap":"^21.5.1","tshy":"^3.1.3","typedoc":"^0.28.16"},"scripts":{"preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tshy && bash build.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","format":"prettier --write .","typedoc":"typedoc"},"engines":{"node":"^20.17.0 || >=22.9.0"},"gitHead":"0e9865ac018fd9e11427137eaad61fe90618e35c","_id":"@isaacs/which@7.0.4","bugs":{"url":"https://github.com/isaacs/which/issues"},"homepage":"https://github.com/isaacs/which#readme","_nodeVersion":"24.4.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-qXToWZFY9CKvWsveV3R5VHNJLQkHTIJXO9J4Xa1UgNwVCRA2LEsmvWC84MIdnezFLsjn2Q+GzbL/8yVF1/ozJw==","shasum":"3f517f69d80cad1eaba08987632d2e6ab0d9b695","tarball":"http://registry-npm.ywwl.com/@isaacs/which/download/@isaacs/which-7.0.4.tgz","fileCount":17,"unpackedSize":81440,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDrD30Ku6w8nCRtIcacwM93Hap1WkPXsRz20WiGxUkBLAIhANko6D9/DK6pQhcQZUEWKj0K4lH9mnQXVVW75Q8IuUwy"}],"size":12562,"noattachment":false,"key":"/@isaacs/which/-/@isaacs/which-7.0.4.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/which_7.0.4_1770654526643_0.1492319900064485"},"_hasShrinkwrap":false,"readme":"# @isaacs/which\n\nLike the unix `which` utility.\n\nFinds the first instance of a specified executable in the PATH\nenvironment variable. Does not cache the results, so `hash -r` is not\nneeded when the PATH changes.\n\n## Fork Notice\n\nThis is a fork of the original `which` module that I wrote in\n2011, because that became the property of npm, and I wanted a\nhybrid CommonJS/ESM typescript implementation, which doesn't\nalign with the npm team's needs.\n\nI'm ok with the fork continuing to exist. It is fine for\ndifferent parties to have different priorities. This is a small\nmodule, and it does no harm to have multiple copies in the world.\n\n## USAGE\n\n```ts\nimport { which, whichSync } from '@isaacs/which'\n\n// async usage\n// rejects if not found\nconst resolved = await which('node')\n\n// if nothrow option is used, returns null if not found\nconst resolvedOrNull = await which('node', { nothrow: true })\n\n// sync usage\n// throws if not found\nconst resolved = whichSync('node')\n\n// if nothrow option is used, returns null if not found\nconst resolvedOrNull = whichSync('node', { nothrow: true })\n\n// Pass options to override the PATH and PATHEXT environment vars.\nawait which('node', { path: someOtherPath, pathExt: somePathExt })\n```\n\n## OPTIONS\n\nYou may pass an options object as the second argument.\n\n- `path`: Use instead of the `PATH` environment variable.\n- `pathExt`: Use instead of the `PATHEXT` environment variable.\n- `all`: Return all matches, instead of just the first one. Note that\n  this means the function returns an array of strings instead of a\n  single string.\n","publish_time":1770654526780,"_cnpm_publish_time":1770654526780,"dist-tags":{"latest":"7.0.4"}}