A tiny library to help you find out where a given node module has been installed

npm install describe-module@0.1.1


Describe module

Build Status Coverage Status semantic-release


$ npm install --save describe-module


Describe Module can tell you a couple of things about other node.js modules that live on the same machine. It can discover where a given module's been installed and if it's global, local, or under development.

For TypeScript projects load it using:

import { describe } from 'describe-module';

and for the JavaScript ones:

var describe = require('describe-module').default

Global Modules

A global module is the one installed with the -g switch. If we wanted to find out more about grunt for example:

$ npm install -g grunt
var describe = require('describe-module').default

{ name: 'grunt',
  path: '/usr/local/lib/node_modules/grunt',
  mode: 'global' }

Local Modules

A local module is the one that lives under the node_modules directory, for example:

$ npm install --save describe-module
var describe = require('describe-module').default

{ name: 'describe-module',
  path: '/home/jan/demo-project/node_modules/describe-module',
  mode: 'local' }

Dev Modules

A dev module is the one you're currently developing ;-) So assuming that you're developing a my-awesome-module and placed it under /home/awesomedev/projects/my-awesome-module:

{ name: 'my-awesome-module',
  path: '/home/awesomedev/projects/my-awesome-module',
  mode: 'dev' }

Your feedback matters!

Do you find Describe Module useful? Give it a star! ★

Found a bug? Raise an issue or submit a pull request.

Have feedback? Let me know on twitter: @JanMolak