Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

global-dirs

Package Overview
Dependencies
1
Maintainers
1
Versions
7
Issues
File Explorer

Advanced tools

global-dirs

Get the directory of globally installed packages and binaries

    3.0.0latest

Version published
Maintainers
1
Weekly downloads
13,183,345
decreased by-3.25%

Weekly downloads

Changelog

Source

Breaking

  • Require Node.js 10 0a99997

https://github.com/sindresorhus/global-dirs/compare/v2.1.0...v3.0.0

Readme

Source

global-dirs

Get the directory of globally installed packages and binaries

Uses the same resolution logic as npm and yarn.

Install

$ npm install global-dirs

Usage

const globalDirectories = require('global-dirs'); console.log(globalDirectories.npm.prefix); //=> '/usr/local' console.log(globalDirectories.npm.packages); //=> '/usr/local/lib/node_modules' console.log(globalDirectories.npm.binaries); //=> '/usr/local/bin' console.log(globalDirectories.yarn.packages); //=> '/Users/sindresorhus/.config/yarn/global/node_modules'

API

globalDirectories

npm
yarn
packages

Directory with globally installed packages.

Equivalent to npm root --global.

binaries

Directory with globally installed binaries.

Equivalent to npm bin --global.

prefix

Directory with directories for packages and binaries. You probably want either of the above.

Equivalent to npm prefix --global.

  • import-global - Import a globally installed module
  • resolve-global - Resolve the path of a globally installed module
  • is-installed-globally - Check if your package was installed globally

Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Keywords

FAQs

What is global-dirs?

Get the directory of globally installed packages and binaries

Is global-dirs popular?

The npm package global-dirs receives a total of 10,694,598 weekly downloads. As such, global-dirs popularity was classified as popular.

Is global-dirs well maintained?

We found that global-dirs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 12 Jan 2021
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc