Socket
Socket
Sign inDemoInstall

global-modules

Package Overview
Dependencies
7
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    global-modules

The directory used by npm for globally installed npm modules.


Version published
Weekly downloads
14M
decreased by-10.07%
Maintainers
1
Install size
69.3 kB
Created
Weekly downloads
 

Package description

What is global-modules?

The global-modules npm package provides the location of the globally installed npm packages on the user's system. It is a simple utility that can be used to find out where global npm packages are stored, which can vary depending on the operating system and the configuration of the npm environment.

What are global-modules's main functionalities?

Get the path to global node_modules

This feature allows you to retrieve the path to the directory where global npm packages are installed. The code sample shows how to import the global-modules package and log the path to the console.

const globalModules = require('global-modules');
console.log(globalModules);

Other packages similar to global-modules

Readme

Source

global-modules NPM version

The directory used by npm for globally installed npm modules.

Install with npm

$ npm i global-modules --save

Usage

var dir = require('global-modules');
//=> '/usr/local/lib/node_modules' (depends on OS)

Other projects

  • cwd: Node.js util for easily getting the current working directory of a project based on package.json… more
  • contains-path: Return true if a file path contains the given path.
  • global-prefix: Get the npm global path prefix.
  • git-config-path: Resolve the path to the user's global .gitconfig.

Run tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on July 15, 2015.

Keywords

FAQs

Last updated on 15 Jul 2015

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