{"library":"npm-which","title":"npm-which","description":"Locates executables from locally or parent-installed node modules, similar to `which` but respecting npm's PATH. Version 3.0.1 is stable with no recent releases. Key differentiator: it is faster than shelling out to `npm bin` and works across the node_modules hierarchy, not just the current directory. Supports both async and sync APIs, and a CLI. Requires Node >=4.2.0, no runtime dependencies.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install npm-which"],"cli":{"name":"npm-which","version":null}},"imports":["import npmWhich from 'npm-which'","const which = require('npm-which')(cwd); const result = which.sync(name)","const which = require('npm-which')(cwd); which(name, callback)"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import npmWhich from 'npm-which';\n\nconst cwd = process.cwd();\nconst which = npmWhich(cwd);\n\n// Async\nwhich('tape', (err, path) => {\n  if (err) console.error(err.message);\n  else console.log(path);\n});\n\n// Sync\nconst pathToTape = which.sync('tape');\nconsole.log(pathToTape);\n\n// CLI: npm-which tape","lang":"typescript","description":"Shows programmatic usage (async and sync) and CLI invocation.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}