🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

module-root

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

module-root

Get the resolved path the root (directory) of a package installed in node_modules.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

module-root NPM version

For Node.js projects, set the CWD (current working directory) to the same directory as package.json.

Quickstart

var root = require('module-root');

Usage

root('lodash');
//=> ~/your-project/node_modules/lodash

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors. Released under the MIT license

Keywords

cwd

FAQs

Package last updated on 10 Aug 2016

Did you know?

Socket

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