Socket
Socket
Sign inDemoInstall

@lite-js/module-path

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @lite-js/module-path

locate the path of an installed node module


Version published
Maintainers
1
Install size
5.69 kB
Created

Readme

Source

module-path(1)

locate the path of an installed node module

install

$ npm install @lite-js/module-path [-g]

API

const modulePath = require('@lite-js/module-path')

// global module
console.log(modulePath('zfinder'))
// => /Users/liangwensen/.nvm/versions/node/v4.2.2/lib/node_modules/.zfinder_npminstall/zfinder/0.2.9/zfinder/lib/index.js

// local module
console.log(modulePath('mocha'))
// => /Users/liangwensen/repo/leungwensen/module-path/node_modules/.npminstall/mocha/3.4.2/mocha/index.js

// core module
console.log(modulePath('path'))
// => path

CLI

$ npm install @lite-js/module-path -g
$ module-path zfinder
# /Users/liangwensen/.nvm/versions/node/v4.2.2/lib/node_modules/.zfinder_npminstall/zfinder/0.2.9/zfinder/lib/index.js
$ module-path npm
# /Users/liangwensen/.nvm/versions/node/v4.2.2/lib/node_modules/npm/lib/npm.js

Thanks to

  • tj/commander.js

Keywords

FAQs

Last updated on 27 May 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc