{"_id":"resolve-global","_rev":"3282538","name":"resolve-global","description":"Resolve the path of a globally installed module","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2024-05-16T05:34:24.000Z","created":"2017-06-25T23:30:13.018Z","2.0.0":"2023-11-06T21:16:00.715Z","1.0.0":"2019-04-15T16:16:39.774Z","0.1.0":"2017-06-25T23:30:13.018Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/resolve-global.git"},"versions":{"2.0.0":{"name":"resolve-global","version":"2.0.0","description":"Resolve the path of a globally installed module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/resolve-global.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":["resolve","global","package","module","globally","path","npm","yarn","packages","require"],"dependencies":{"global-directory":"^4.0.1"},"devDependencies":{"ava":"^5.3.1","execa":"^8.0.1","tsd":"^0.29.0","xo":"^0.56.0"},"ava":{"timeout":"10m"},"types":"./index.d.ts","gitHead":"36b992f418258a94c091a3c13a012b08d805a7bf","bugs":{"url":"https://github.com/sindresorhus/resolve-global/issues"},"homepage":"https://github.com/sindresorhus/resolve-global#readme","_id":"resolve-global@2.0.0","_nodeVersion":"20.9.0","_npmVersion":"9.2.0","dist":{"shasum":"2ff55640800bf3692f089b6008357f75e1a27e54","size":1995,"noattachment":false,"key":"/resolve-global/-/resolve-global-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/resolve-global/download/resolve-global-2.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/resolve-global_2.0.0_1699305360558_0.08510973393854404"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-11-06T21:16:00.715Z","publish_time":1699305360715,"_source_registry_name":"default","_cnpm_publish_time":1699305360715},"1.0.0":{"name":"resolve-global","version":"1.0.0","description":"Resolve the path of a globally installed module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/resolve-global.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["resolve","global","package","module","globally","path","npm","yarn","packages","require"],"dependencies":{"global-dirs":"^0.1.1"},"devDependencies":{"ava":"^1.4.1","execa":"^1.0.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"85501d94ebee85a00236c4477a63e978c09198da","bugs":{"url":"https://github.com/sindresorhus/resolve-global/issues"},"homepage":"https://github.com/sindresorhus/resolve-global#readme","_id":"resolve-global@1.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a2a79df4af2ca3f49bf77ef9ddacd322dad19255","size":1912,"noattachment":false,"key":"/resolve-global/-/resolve-global-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/resolve-global/download/resolve-global-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/resolve-global_1.0.0_1555344999661_0.9415713619696922"},"_hasShrinkwrap":false,"publish_time":1555344999774,"_cnpm_publish_time":1555344999774},"0.1.0":{"name":"resolve-global","version":"0.1.0","description":"Resolve the path of a globally installed module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/resolve-global.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["resolve","global","package","module","globally","path","npm","yarn","packages","require"],"dependencies":{"global-dirs":"^0.1.0"},"devDependencies":{"ava":"*","execa":"^0.7.0","xo":"*"},"gitHead":"74a951cac6fa88fda8d45147eb634198b5aeff7a","bugs":{"url":"https://github.com/sindresorhus/resolve-global/issues"},"homepage":"https://github.com/sindresorhus/resolve-global#readme","_id":"resolve-global@0.1.0","_shasum":"8fb02cfd5b7db20118e886311f15af95bd15fbd9","_from":".","_npmVersion":"4.6.1","_nodeVersion":"8.0.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"8fb02cfd5b7db20118e886311f15af95bd15fbd9","size":1744,"noattachment":false,"key":"/resolve-global/-/resolve-global-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/resolve-global/download/resolve-global-0.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/resolve-global-0.1.0.tgz_1498433411967_0.031970058334991336"},"directories":{},"publish_time":1498433413018,"_hasShrinkwrap":false,"_cnpm_publish_time":1498433413018}},"readme":"# resolve-global\n\n> Resolve the path of a globally installed module\n\n## Install\n\n```sh\nnpm install resolve-global\n```\n\n## Usage\n\n```sh\nnpm install --global cat-names\n```\n\n```js\nimport {resolveGlobal} from 'resolve-global';\n\nconsole.log(resolveGlobal('cat-names'));\n//=> '/usr/local/lib/node_modules/cat-names'\n```\n\n## API\n\n### resolveGlobal(moduleName)\n\nThrows if the module cannot be found.\n\n### resolveGlobalSilent(moduleName)\n\nReturns `undefined` instead of throwing if the module cannot be found.\n\n#### moduleName\n\nType: `string`\n\nWhat you would use in [`import()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import).\n\n## Related\n\n- [import-global](https://github.com/sindresorhus/import-global) - Import a globally installed module\n- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module from a given path\n- [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path\n- [is-installed-globally](https://github.com/sindresorhus/is-installed-globally) - Check if your package was installed globally\n- [global-directory](https://github.com/sindresorhus/global-directory) - Get the directory of globally installed packages and binaries\n","_attachments":{},"homepage":"https://github.com/sindresorhus/resolve-global#readme","bugs":{"url":"https://github.com/sindresorhus/resolve-global/issues"},"license":"MIT"}