Negligible Participation Metric

npm

Need private packages and team management tools?Check out npm Orgs. »

resolve-global

1.0.0 • Public • Published

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

install

npm i resolve-global

Downloadsweekly downloads

343,803

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability