{"name":"global-directory","version":"5.0.0","description":"Get the directory of globally installed packages and binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/global-directory.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava && tsd"},"keywords":["global","prefix","path","paths","npm","yarn","pnpm","node","modules","node-modules","package","packages","binary","binaries","bin","directory","directories","npmrc","rc","config","root","resolve"],"dependencies":{"ini":"6.0.0"},"devDependencies":{"ava":"^6.4.1","execa":"^9.6.1","tsd":"^0.33.0","xo":"^1.2.3"},"gitHead":"e1ed110e19db77e94b586c73e2a94356327d5e4f","types":"./index.d.ts","_id":"global-directory@5.0.0","bugs":{"url":"https://github.com/sindresorhus/global-directory/issues"},"homepage":"https://github.com/sindresorhus/global-directory#readme","_nodeVersion":"25.3.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-1pgFdhK3J2LeM+dVf2Pd424yHx2ou338lC0ErNP2hPx4j8eW1Sp0XqSjNxtk6Tc4Kr5wlWtSvz8cn2yb7/SG/w==","shasum":"0f66a94212acd0f81ee838d0a991e88d1c2836cf","tarball":"http://registry-npm.ywwl.com/global-directory/download/global-directory-5.0.0.tgz","fileCount":5,"unpackedSize":11403,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAJaxPND9tC8UcuO08Nnx+aJGPxRDHC3gCuj26wR9sIFAiEAvrKJqjj10c/MzlhDTXzXukwO1cKtoosdZiAoq7x0Tg8="}],"size":3401,"noattachment":false,"key":"/global-directory/-/global-directory-5.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/global-directory_5.0.0_1770051864246_0.7220049578716725"},"_hasShrinkwrap":false,"readme":"# global-directory\n\n> Get the directory of globally installed packages and binaries\n\nUses the same resolution logic as `npm`, `yarn`, and `pnpm`.\n\n## Install\n\n```sh\nnpm install global-directory\n```\n\n## Usage\n\n```js\nimport globalDirectory from 'global-directory';\n\nconsole.log(globalDirectory.npm.prefix);\n//=> '/usr/local'\n\nconsole.log(globalDirectory.npm.packages);\n//=> '/usr/local/lib/node_modules'\n\nconsole.log(globalDirectory.npm.binaries);\n//=> '/usr/local/bin'\n\nconsole.log(globalDirectory.yarn.packages);\n//=> '/Users/sindresorhus/.config/yarn/global/node_modules'\n\nconsole.log(globalDirectory.pnpm.prefix);\n//=> '/Users/sindresorhus/Library/pnpm'\n\nconsole.log(globalDirectory.pnpm.packages);\n//=> '/Users/sindresorhus/Library/pnpm/global/5/node_modules'\n```\n\n## API\n\n### globalDirectory\n\n#### npm\n#### yarn\n#### pnpm\n\n##### packages\n\nThe directory with globally installed packages.\n\nEquivalent to `npm root --global`.\n\n##### binaries\n\nThe directory with globally installed binaries.\n\nEquivalent to `npm bin --global`.\n\n##### prefix\n\nThe directory with directories for packages and binaries. You probably want either of the above.\n\nEquivalent to `npm prefix --global`.\n\n## Related\n\n- [import-global](https://github.com/sindresorhus/import-global) - Import a globally installed module\n- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module\n- [is-installed-globally](https://github.com/sindresorhus/is-installed-globally) - Check if your package was installed globally\n","publish_time":1770051864387,"_cnpm_publish_time":1770051864387,"dist-tags":{"latest":"5.0.0"}}