peach a19a732be8 commit message %!s(int64=2) %!d(string=hai) anos
..
index.d.ts a19a732be8 commit message %!s(int64=2) %!d(string=hai) anos
index.js a19a732be8 commit message %!s(int64=2) %!d(string=hai) anos
license a19a732be8 commit message %!s(int64=2) %!d(string=hai) anos
package.json a19a732be8 commit message %!s(int64=2) %!d(string=hai) anos
readme.md a19a732be8 commit message %!s(int64=2) %!d(string=hai) anos

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().

Related

License

MIT © Sindre Sorhus