{"_id":"global-dirs","_rev":"2376","name":"global-dirs","description":"Get the directory of globally installed packages and binaries","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-06-03T09:56:08.000Z","created":"2017-06-25T22:20:19.199Z","3.0.0":"2021-01-12T07:42:45.826Z","2.1.0":"2020-12-14T14:46:36.047Z","2.0.1":"2019-11-08T16:32:21.836Z","2.0.0":"2019-09-17T06:38:38.471Z","1.0.0":"2019-05-02T03:23:55.236Z","0.1.1":"2017-11-19T06:28:58.400Z","0.1.0":"2017-06-25T22:20:19.199Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/global-dirs.git"},"versions":{"3.0.0":{"name":"global-dirs","version":"3.0.0","description":"Get the directory of globally installed packages and binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/global-dirs.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"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":"2.0.0"},"devDependencies":{"ava":"^2.4.0","execa":"^5.0.0","import-fresh":"^3.3.0","tsd":"^0.14.0","xo":"^0.37.1"},"gitHead":"be2b88509773bc38c4582f3c1483b08e0025792e","bugs":{"url":"https://github.com/sindresorhus/global-dirs/issues"},"homepage":"https://github.com/sindresorhus/global-dirs#readme","_id":"global-dirs@3.0.0","_nodeVersion":"10.22.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"70a76fe84ea315ab37b1f5576cbde7d48ef72686","size":3086,"noattachment":false,"key":"/global-dirs/-/global-dirs-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/global-dirs/download/global-dirs-3.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-dirs_3.0.0_1610437365723_0.9286980641305083"},"_hasShrinkwrap":false,"publish_time":1610437365826,"_cnpm_publish_time":1610437365826},"2.1.0":{"name":"global-dirs","version":"2.1.0","description":"Get the directory of globally installed packages and binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/global-dirs.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=8"},"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":"1.3.7"},"devDependencies":{"ava":"^2.4.0","execa":"^3.2.0","import-fresh":"^3.1.0","tsd":"^0.10.0","xo":"^0.25.3"},"gitHead":"055d2b62c87c9e1dcfe5972da8d9c4be291e50f3","bugs":{"url":"https://github.com/sindresorhus/global-dirs/issues"},"homepage":"https://github.com/sindresorhus/global-dirs#readme","_id":"global-dirs@2.1.0","_nodeVersion":"10.22.1","_npmVersion":"6.14.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"e9046a49c806ff04d6c1825e196c8f0091e8df4d","size":3034,"noattachment":false,"key":"/global-dirs/-/global-dirs-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/global-dirs/download/global-dirs-2.1.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-dirs_2.1.0_1607957195877_0.6198426020400563"},"_hasShrinkwrap":false,"publish_time":1607957196047,"_cnpm_publish_time":1607957196047},"2.0.1":{"name":"global-dirs","version":"2.0.1","description":"Get the directory of globally installed packages and binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/global-dirs.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"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":"^1.3.5"},"devDependencies":{"ava":"^2.4.0","execa":"^3.2.0","import-fresh":"^3.1.0","tsd":"^0.10.0","xo":"^0.25.3"},"gitHead":"327d5e621f51f7f39d212223c22cf9cd8f0e288f","bugs":{"url":"https://github.com/sindresorhus/global-dirs/issues"},"homepage":"https://github.com/sindresorhus/global-dirs#readme","_id":"global-dirs@2.0.1","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"acdf3bb6685bcd55cb35e8a052266569e9469201","size":3055,"noattachment":false,"key":"/global-dirs/-/global-dirs-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/global-dirs/download/global-dirs-2.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-dirs_2.0.1_1573230741719_0.9586319357797652"},"_hasShrinkwrap":false,"publish_time":1573230741836,"_cnpm_publish_time":1573230741836},"2.0.0":{"name":"global-dirs","version":"2.0.0","description":"Get the directory of globally installed packages and binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/global-dirs.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"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":"^1.3.5"},"devDependencies":{"ava":"^2.4.0","execa":"^2.0.4","import-fresh":"^3.1.0","tsd":"^0.7.4","xo":"^0.24.0"},"gitHead":"d6c86fc94680042cb3fa1f0fb5aefbd183f850be","bugs":{"url":"https://github.com/sindresorhus/global-dirs/issues"},"homepage":"https://github.com/sindresorhus/global-dirs#readme","_id":"global-dirs@2.0.0","_nodeVersion":"8.16.1","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"fece111e32f8fad04ff73186362bb32ddeaac2e8","size":3035,"noattachment":false,"key":"/global-dirs/-/global-dirs-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/global-dirs/download/global-dirs-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-dirs_2.0.0_1568702318326_0.04720537671434588"},"_hasShrinkwrap":false,"publish_time":1568702318471,"_cnpm_publish_time":1568702318471},"1.0.0":{"name":"global-dirs","version":"1.0.0","description":"Get the directory of globally installed packages and binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/global-dirs.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"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":"^1.3.5"},"devDependencies":{"ava":"^1.4.1","execa":"^1.0.0","import-fresh":"^3.0.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"c197272db0c670e5ddaa3f0b0dbef8f030931780","bugs":{"url":"https://github.com/sindresorhus/global-dirs/issues"},"homepage":"https://github.com/sindresorhus/global-dirs#readme","_id":"global-dirs@1.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"cfd8261df0fb13a7ba0647b2cf5cf06f0376da01","size":2777,"noattachment":false,"key":"/global-dirs/-/global-dirs-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/global-dirs/download/global-dirs-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-dirs_1.0.0_1556767435068_0.7176131569076813"},"_hasShrinkwrap":false,"publish_time":1556767435236,"_cnpm_publish_time":1556767435236},"0.1.1":{"name":"global-dirs","version":"0.1.1","description":"Get the directory of globally installed packages and binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/global-dirs.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"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":"^1.3.4"},"devDependencies":{"ava":"*","execa":"^0.7.0","xo":"*"},"gitHead":"bcb8a21a40930022e069f9c5b506ce41c8d46bff","bugs":{"url":"https://github.com/sindresorhus/global-dirs/issues"},"homepage":"https://github.com/sindresorhus/global-dirs#readme","_id":"global-dirs@0.1.1","_shasum":"b319c0dd4607f353f3be9cca4c72fc148c49f445","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"b319c0dd4607f353f3be9cca4c72fc148c49f445","size":2353,"noattachment":false,"key":"/global-dirs/-/global-dirs-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/global-dirs/download/global-dirs-0.1.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-dirs-0.1.1.tgz_1511072938335_0.43734972598031163"},"directories":{},"publish_time":1511072938400,"_hasShrinkwrap":false,"_cnpm_publish_time":1511072938400},"0.1.0":{"name":"global-dirs","version":"0.1.0","description":"Get the directory of globally installed packages and binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/global-dirs.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"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":"^1.3.4"},"devDependencies":{"ava":"*","execa":"^0.7.0","xo":"*"},"gitHead":"d8d99bcad75693b4c6380cffd57a49256675cc9c","bugs":{"url":"https://github.com/sindresorhus/global-dirs/issues"},"homepage":"https://github.com/sindresorhus/global-dirs#readme","_id":"global-dirs@0.1.0","_shasum":"10d34039e0df04272e262cf24224f7209434df4f","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"10d34039e0df04272e262cf24224f7209434df4f","size":2349,"noattachment":false,"key":"/global-dirs/-/global-dirs-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/global-dirs/download/global-dirs-0.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-dirs-0.1.0.tgz_1498429218250_0.46048022201284766"},"directories":{},"publish_time":1498429219199,"_hasShrinkwrap":false,"_cnpm_publish_time":1498429219199}},"readme":"# global-dirs\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```\n$ npm install global-dirs\n```\n\n## Usage\n\n```js\nconst globalDirectories = require('global-dirs');\n\nconsole.log(globalDirectories.npm.prefix);\n//=> '/usr/local'\n\nconsole.log(globalDirectories.npm.packages);\n//=> '/usr/local/lib/node_modules'\n\nconsole.log(globalDirectories.npm.binaries);\n//=> '/usr/local/bin'\n\nconsole.log(globalDirectories.yarn.packages);\n//=> '/Users/sindresorhus/.config/yarn/global/node_modules'\n```\n\n## API\n\n### globalDirectories\n\n#### npm\n#### yarn\n\n##### packages\n\nDirectory with globally installed packages.\n\nEquivalent to `npm root --global`.\n\n##### binaries\n\nDirectory with globally installed binaries.\n\nEquivalent to `npm bin --global`.\n\n##### prefix\n\nDirectory 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\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-global-dirs?utm_source=npm-global-dirs&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","_attachments":{},"homepage":"https://github.com/sindresorhus/global-dirs#readme","bugs":{"url":"https://github.com/sindresorhus/global-dirs/issues"},"license":"MIT"}