peach a19a732be8 commit message | 2 роки тому | |
---|---|---|
.. | ||
index.d.ts | 2 роки тому | |
index.js | 2 роки тому | |
license | 2 роки тому | |
package.json | 2 роки тому | |
readme.md | 2 роки тому |
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