resolve-global
Resolve the path of a globally installed module
Last updated 3 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install resolve-global 
SYNC missed versions from official npm registry.

resolve-global

Resolve the path of a globally installed module

Install

npm install resolve-global

Usage

npm install --global cat-names
import {resolveGlobal} from 'resolve-global';

console.log(resolveGlobal('cat-names'));
//=> '/usr/local/lib/node_modules/cat-names'

API

resolveGlobal(moduleName)

Throws if the module cannot be found.

resolveGlobalSilent(moduleName)

Returns undefined instead of throwing if the module cannot be found.

moduleName

Type: string

What you would use in import().

Related

Current Tags

  • 2.0.0                                ...           latest (3 years ago)

3 Versions

  • 2.0.0                                ...           3 years ago
  • 1.0.0                                ...           8 years ago
  • 0.1.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 7
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (4)

© 2010 - cnpmjs.org x YWFE | Home | YWFE