{"_id":"@pnpm/which","name":"@pnpm/which","dist-tags":{"latest":"3.0.1"},"versions":{"3.0.1":{"author":{"name":"GitHub Inc."},"name":"@pnpm/which","description":"Like which(1) unix command. Find the first instance of an executable in the PATH.","version":"3.0.1","repository":{"type":"git","url":"git+https://github.com/pnpm/which.git"},"main":"lib/index.js","bin":{"node-which":"bin/which.js"},"license":"ISC","dependencies":{"isexe":"^2.0.0"},"devDependencies":{"@npmcli/eslint-config":"^4.0.0","@npmcli/template-oss":"4.14.1","tap":"^16.3.0"},"tap":{"check-coverage":true,"nyc-arg":["--exclude","tap-snapshots/**"]},"engines":{"node":"^14.17.0 || ^16.13.0 || >=18.0.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.14.1","publish":"true"},"scripts":{"test":"tap","lint":"eslint \"**/*.js\"","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run lint -- --fix","snap":"tap","posttest":"npm run lint"},"bugs":{"url":"https://github.com/pnpm/which/issues"},"homepage":"https://github.com/pnpm/which#readme","_id":"@pnpm/which@3.0.1","_integrity":"sha512-4ivtS12Oni9axgGefaq+gTPD+7N0VPCFdxFH8izCaWfnxLQblX3iVxba+25ZoagStlzUs8sQg8OMKlCVhyGWTw==","_resolved":"/private/var/folders/g7/5ygp0ncd6qx5g4fn5hpsqq5c0000gn/T/6a8dd6843a6bd46c973af73d28d86c33/pnpm-which-3.0.1.tgz","_from":"file:pnpm-which-3.0.1.tgz","_nodeVersion":"16.20.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-4ivtS12Oni9axgGefaq+gTPD+7N0VPCFdxFH8izCaWfnxLQblX3iVxba+25ZoagStlzUs8sQg8OMKlCVhyGWTw==","shasum":"194afd077c3564bed6ab6f102225aa938e6a7486","tarball":"https://registry.npmjs.org/@pnpm/which/-/which-3.0.1.tgz","fileCount":5,"unpackedSize":7548,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3Za2/al6vDXkrYFHmaOaM82UCB5hVnNXRSHfOIEGifQIhALV9iwnocTld6whWqGMGIBZaFfvkMTbFLQJn8btLCVri"}]},"_npmUser":{"name":"zkochan","email":"z@kochan.io"},"directories":{},"maintainers":[{"name":"pnpmuser","email":"publish-bot@pnpm.io"},{"name":"zkochan","email":"z@kochan.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/which_3.0.1_1684102107388_0.7049507760709981"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-14T22:08:27.319Z","3.0.1":"2023-05-14T22:08:27.551Z","modified":"2023-05-14T22:08:27.772Z"},"maintainers":[{"name":"pnpmuser","email":"publish-bot@pnpm.io"},{"name":"zkochan","email":"z@kochan.io"}],"description":"Like which(1) unix command. Find the first instance of an executable in the PATH.","homepage":"https://github.com/pnpm/which#readme","repository":{"type":"git","url":"git+https://github.com/pnpm/which.git"},"author":{"name":"GitHub Inc."},"bugs":{"url":"https://github.com/pnpm/which/issues"},"license":"ISC","readme":"# @pnpm/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\nUnlike the original version of this package, this does not look\nfor the binary in the CWD on Windows. This is change was needed\nto avoid binary planting attacks.\n\n## USAGE\n\n```javascript\nconst which = require('@pnpm/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 = which.sync('node')\n\n// if nothrow option is used, returns null if not found\nconst resolvedOrNull = which.sync('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## CLI USAGE\n\nJust like the BSD `which(1)` binary but using `node-which`.\n\n```\nusage: node-which [-as] program ...\n```\n\nYou can learn more about why the binary is `node-which` and not `which` \n[here](https://github.com/npm/node-which/pull/67)\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"}