{"name":"global-directory","version":"4.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":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["global","prefix","path","paths","npm","yarn","node","modules","node-modules","package","packages","binary","binaries","bin","directory","directories","npmrc","rc","config","root","resolve"],"dependencies":{"ini":"4.1.1"},"devDependencies":{"ava":"^5.3.1","execa":"^8.0.1","tsd":"^0.29.0","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"695dc057789d08fcb5c820d4b3669e52dc72779b","bugs":{"url":"https://github.com/sindresorhus/global-directory/issues"},"homepage":"https://github.com/sindresorhus/global-directory#readme","_id":"global-directory@4.0.0","_nodeVersion":"20.9.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-3vKugswCmRx+wqK8azY+6yFXfi3DzPLyMtzUmVbBp6CqV+7v6vcOwUJGt50fmc9orIyCh29g2ypcXWfbCMZVWw==","shasum":"8078838682ddf95d1a17265a6b208bf5570a302b","tarball":"http://registry-npm.ywwl.com/global-directory/download/global-directory-4.0.0.tgz","fileCount":5,"unpackedSize":8045,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICUpliOd46GhlwYOiSY9FxXClZ0ymks+i0aX8NVtmH6KAiA6N6RbJDME97EpVn0N821EhWJBu3cb/AtVckyvnqHjIw=="}],"size":2877,"noattachment":false,"key":"/global-directory/-/global-directory-4.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-directory_4.0.0_1699285327792_0.31894163192859804"},"_hasShrinkwrap":false,"readme":"# global-directory\n\n> Get the directory of globally installed packages and binaries\n\nUses the same resolution logic as `npm` and `yarn`.\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```\n\n## API\n\n### globalDirectory\n\n#### npm\n#### yarn\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":1699285327969,"_cnpm_publish_time":1699285327969,"dist-tags":{"latest":"5.0.0"}}