resolve-global
Resolve the path of a globally installed module
Last updated 2 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (2 years ago)

3 Versions

  • 2.0.0                                ...           2 years ago
  • 1.0.0                                ...           7 years ago
  • 0.1.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 83
This Month 118
Last Day 15
Last Week 55
Last Month 297
Dependencies (1)
Dev Dependencies (4)

Copyright 2013 - present © cnpmjs.org | Home |