is-installed-globally
Check if your package was installed globally
Last updated 5 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install is-installed-globally 
SYNC missed versions from official npm registry.

is-installed-globally

Check if your package was installed globally

Can be useful if your CLI needs different behavior when installed globally and locally.

Install

$ npm install is-installed-globally

Usage

const isInstalledGlobally = require('is-installed-globally');

// With `npm install your-package`
console.log(isInstalledGlobally);
//=> false

// With `npm install --global your-package`
console.log(isInstalledGlobally);
//=> true

Related

  • import-global - Import a globally installed module
  • resolve-global - Resolve the path of a globally installed module
  • global-dirs - Get the directory of globally installed packages and binaries

Current Tags

  • 0.4.0                                ...           latest (4 years ago)

6 Versions

  • 0.4.0                                ...           4 years ago
  • 0.3.2                                ...           5 years ago
  • 0.3.1                                ...           5 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 19
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (7)

Copyright 2013 - present © cnpmjs.org | Home |