Package Exports
- resolve-global
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (resolve-global) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
resolve-global 
Resolve the path of a globally installed module
Install
$ npm install resolve-globalUsage
$ npm install --global cat-namesconst resolveGlobal = require('resolve-global');
console.log(resolveGlobal('cat-names'));
//=> '/usr/local/lib/node_modules/cat-names'API
resolveGlobal(moduleId)
Throws if the module can't be found.
resolveGlobal.silent(moduleId)
Returns null instead of throwing if the module can't be found.
moduleId
Type: string
What you would use in require().
Related
- import-global - Import a globally installed module
- resolve-from - Resolve the path of a module from a given path
- import-from - Import a module from a given path
- is-installed-globally - Check if your package was installed globally
- global-dirs - Get the directory of globally installed packages and binaries
License
MIT © Sindre Sorhus