Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

global-dirs

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

global-dirs

Get the directory of globally installed packages and binaries

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16M
increased by6.81%
Maintainers
1
Weekly downloads
 
Created

What is global-dirs?

The global-dirs npm package is designed to provide information about the directories used by npm and Yarn for global installations. This can include paths to globally installed packages, binaries, and more. It's particularly useful for tooling and applications that need to interact with or manage globally installed npm or Yarn packages.

What are global-dirs's main functionalities?

Accessing npm and Yarn global directories

This feature allows you to access the paths to the global installation directories of npm and Yarn. This can be useful for tools that need to know where global packages are installed.

const globalDirs = require('global-dirs');
console.log(globalDirs.npm.prefix); // Path to npm's global installation directory
console.log(globalDirs.yarn.prefix); // Path to Yarn's global installation directory

Accessing npm and Yarn global binaries directories

This feature provides the paths to the directories where npm and Yarn store globally installed binaries. This is useful for executing global binaries or for tools that manage global packages and their executables.

const globalDirs = require('global-dirs');
console.log(globalDirs.npm.binaries); // Path to npm's global binaries directory
console.log(globalDirs.yarn.binaries); // Path to Yarn's global binaries directory

Other packages similar to global-dirs

Keywords

FAQs

Package last updated on 06 Nov 2023

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc