{"_id":"@isaacs/which","_rev":"4-6d17eccaa22d04755b73ac9e5547b625","name":"@isaacs/which","dist-tags":{"latest":"7.0.4"},"versions":{"7.0.1":{"name":"@isaacs/which","version":"7.0.1","license":"ISC","_id":"@isaacs/which@7.0.1","maintainers":[{"name":"isaacs","email":"i@izs.me"}],"homepage":"https://github.com/isaacs/which#readme","bugs":{"url":"https://github.com/isaacs/which/issues"},"dist":{"shasum":"97031d66c4bd6b43ebc597591509b1613ee9a87f","tarball":"https://registry.npmjs.org/@isaacs/which/-/which-7.0.1.tgz","fileCount":17,"integrity":"sha512-rMPKFNwbr9yyDkoeZEoU5ze/l/X7gIkRGa+Vniz99/SKrsdaQPJvJZwofGlKr9cMp02AY5BHiDPZNpHovNcoXw==","signatures":[{"sig":"MEYCIQDjj5ya1RqmyjQBXLpYY9ICQvGGmjBai7tWhyMp+NgTBAIhAO6Ya/ZUMSZ+IIPvMjlDupoEPxVDto1JHmj2so1pPHAD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":65812},"main":"./dist/commonjs/index.min.js","tshy":{"exports":{".":{"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"}},"./raw":"./src/index.ts","./package.json":"./package.json"},"selfLink":false},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.min.js","engines":{"node":"^20.17.0 || >=22.9.0"},"exports":{".":{"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"}},"./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"},"gitHead":"f5a18e418fcc2881317dccbc2c0476a4ee0aea0c","scripts":{"snap":"tap","test":"tap","format":"prettier --write .","prepare":"tshy && bash build.sh","presnap":"npm run prepare","pretest":"npm run prepare","typedoc":"typedoc","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"repository":{"url":"git+https://github.com/isaacs/which.git","type":"git"},"_npmVersion":"11.9.0","description":"Like which(1) unix command. Find the first instance of an executable in the PATH.","directories":{},"_nodeVersion":"24.4.1","dependencies":{"isexe":"^3.1.4"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^21.5.1","tshy":"^3.1.3","esbuild":"^0.27.3","typedoc":"^0.28.16","prettier":"^3.8.1"},"_npmOperationalInternal":{"tmp":"tmp/which_7.0.1_1770525163823_0.7367839368727851","host":"s3://npm-registry-packages-npm-production"}},"7.0.2":{"name":"@isaacs/which","version":"7.0.2","license":"ISC","_id":"@isaacs/which@7.0.2","maintainers":[{"name":"isaacs","email":"i@izs.me"}],"homepage":"https://github.com/isaacs/which#readme","bugs":{"url":"https://github.com/isaacs/which/issues"},"dist":{"shasum":"3f2490edf35cec6827777da8322f9ab7dc25d85b","tarball":"https://registry.npmjs.org/@isaacs/which/-/which-7.0.2.tgz","fileCount":17,"integrity":"sha512-y5P1QASIPXn6aZFvhqx1+4pnuBHC/PjLK3LbP0mBoKrRMA/PlQ0nJX9ZgMhc+ycZ5Yk4cWUvRH6aA5flJmKtIA==","signatures":[{"sig":"MEUCIQDgOf7EVBlwBlDeMyqn3op3f1GynzG0xvu58Dog88cWKQIgffszw+vuyhTxiHDdBk1+haD36w1/QqsR3VCMiSVyI8s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81564},"main":"./dist/commonjs/index.min.js","tshy":{"exports":{".":{"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"}},"./raw":"./src/index.ts","./package.json":"./package.json"},"selfLink":false},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.min.js","engines":{"node":"^20.17.0 || >=22.9.0"},"exports":{".":{"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"}},"./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"},"gitHead":"06218f9cf0ed1d61976a5be6b58e3f38441a6766","scripts":{"snap":"tap","test":"tap","format":"prettier --write .","prepare":"tshy && bash build.sh","presnap":"npm run prepare","pretest":"npm run prepare","typedoc":"typedoc","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"repository":{"url":"git+https://github.com/isaacs/which.git","type":"git"},"_npmVersion":"11.9.0","description":"Like which(1) unix command. Find the first instance of an executable in the PATH.","directories":{},"_nodeVersion":"24.4.1","dependencies":{"isexe":"^3.1.4"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^21.5.1","tshy":"^3.1.3","esbuild":"^0.27.3","typedoc":"^0.28.16","prettier":"^3.8.1"},"_npmOperationalInternal":{"tmp":"tmp/which_7.0.2_1770526266371_0.5044793811597139","host":"s3://npm-registry-packages-npm-production"}},"7.0.3":{"name":"@isaacs/which","version":"7.0.3","license":"ISC","_id":"@isaacs/which@7.0.3","maintainers":[{"name":"isaacs","email":"i@izs.me"}],"homepage":"https://github.com/isaacs/which#readme","bugs":{"url":"https://github.com/isaacs/which/issues"},"dist":{"shasum":"d0c01c66411e9b6ed5c4b3711c277f60b62cddf9","tarball":"https://registry.npmjs.org/@isaacs/which/-/which-7.0.3.tgz","fileCount":17,"integrity":"sha512-phHByQpL3FPl2FIwSZeKhgiWjEZZeM96Sv4TxTuNcZY2r3ezpOAF2YtT802CrxfxIwkcZWjixRYqn854xRWjUw==","signatures":[{"sig":"MEUCIA9jueeOwJCeD1sEIbw7ThP/r6fYZ+6Z21Xt6hMrw6dBAiEAjcrMBggbt9xFp0lHh4XZwPfjrEI9rFeXt9yBeM5tQ1o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81440},"main":"./dist/commonjs/index.min.js","tshy":{"exports":{".":{"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"}},"./raw":"./src/index.ts","./package.json":"./package.json"},"selfLink":false},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.min.js","engines":{"node":"^20.17.0 || >=22.9.0"},"exports":{".":{"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"}},"./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"},"gitHead":"50ed9279ddc588dc40004cd4dbb2b400d01acae6","scripts":{"snap":"tap","test":"tap","format":"prettier --write .","prepare":"tshy && bash build.sh","presnap":"npm run prepare","pretest":"npm run prepare","typedoc":"typedoc","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"repository":{"url":"git+https://github.com/isaacs/which.git","type":"git"},"_npmVersion":"11.9.0","description":"Like which(1) unix command. Find the first instance of an executable in the PATH.","directories":{},"_nodeVersion":"24.4.1","dependencies":{"isexe":"^3.1.4"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^21.5.1","tshy":"^3.1.3","esbuild":"^0.27.3","typedoc":"^0.28.16","prettier":"^3.8.1"},"_npmOperationalInternal":{"tmp":"tmp/which_7.0.3_1770526407248_0.6243002764931207","host":"s3://npm-registry-packages-npm-production"}},"7.0.4":{"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":"https://registry.npmjs.org/@isaacs/which/-/which-7.0.4.tgz","fileCount":17,"unpackedSize":81440,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDrD30Ku6w8nCRtIcacwM93Hap1WkPXsRz20WiGxUkBLAIhANko6D9/DK6pQhcQZUEWKj0K4lH9mnQXVVW75Q8IuUwy"}]},"_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}},"time":{"created":"2026-02-08T04:32:43.725Z","modified":"2026-02-09T16:28:46.875Z","7.0.1":"2026-02-08T04:32:43.986Z","7.0.2":"2026-02-08T04:51:06.528Z","7.0.3":"2026-02-08T04:53:27.388Z","7.0.4":"2026-02-09T16:28:46.780Z"},"bugs":{"url":"https://github.com/isaacs/which/issues"},"license":"ISC","homepage":"https://github.com/isaacs/which#readme","repository":{"type":"git","url":"git+https://github.com/isaacs/which.git"},"description":"Like which(1) unix command. Find the first instance of an executable in the PATH.","maintainers":[{"name":"isaacs","email":"i@izs.me"}],"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","readmeFilename":"README.md"}