{"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":"http://registry-npm.ywwl.com/@isaacs/which/download/@isaacs/which-7.0.3.tgz","fileCount":17,"integrity":"sha512-phHByQpL3FPl2FIwSZeKhgiWjEZZeM96Sv4TxTuNcZY2r3ezpOAF2YtT802CrxfxIwkcZWjixRYqn854xRWjUw==","signatures":[{"sig":"MEUCIA9jueeOwJCeD1sEIbw7ThP/r6fYZ+6Z21Xt6hMrw6dBAiEAjcrMBggbt9xFp0lHh4XZwPfjrEI9rFeXt9yBeM5tQ1o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81440,"size":12562,"noattachment":false,"key":"/@isaacs/which/-/@isaacs/which-7.0.3.tgz"},"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"},"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":1770526407388,"_cnpm_publish_time":1770526407388,"dist-tags":{"latest":"7.0.4"}}