lihai 8d6c751f49 feat: push | %!s(int64=2) %!d(string=hai) anos | |
---|---|---|
.. | ||
index.d.ts | %!s(int64=2) %!d(string=hai) anos | |
index.js | %!s(int64=2) %!d(string=hai) anos | |
license | %!s(int64=2) %!d(string=hai) anos | |
package.json | %!s(int64=2) %!d(string=hai) anos | |
readme.md | %!s(int64=2) %!d(string=hai) anos |
Resolve the path of a globally installed module
$ npm install resolve-global
$ npm install --global cat-names
const resolveGlobal = require('resolve-global');
console.log(resolveGlobal('cat-names'));
//=> '/usr/local/lib/node_modules/cat-names'
Throws if the module can't be found.
Returns undefined
instead of throwing if the module can't be found.
Type: string
What you would use in require()
.
MIT © Sindre Sorhus