conventional-changelog-action/node_modules/resolve-global
Conventional Changelog Action 1af857c6a9 chore(release): v3.9.5 2021-10-05 21:52:13 +00:00
..
index.d.ts chore(release): v3.9.5 2021-10-05 21:52:13 +00:00
index.js chore(release): v3.9.5 2021-10-05 21:52:13 +00:00
license chore(release): v3.9.5 2021-10-05 21:52:13 +00:00
package.json chore(release): v3.9.5 2021-10-05 21:52:13 +00:00
readme.md chore(release): v3.9.5 2021-10-05 21:52:13 +00:00

readme.md

resolve-global Build Status

Resolve the path of a globally installed module

Install

$ npm install resolve-global

Usage

$ npm install --global cat-names
const 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 undefined instead of throwing if the module can't be found.

moduleId

Type: string

What you would use in require().

License

MIT © Sindre Sorhus