is-installed-globally
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

import isInstalledGlobally from 'is-installed-globally';

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

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    435,128
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    435,128
  • 0.4.0
    8,159,046
  • 0.3.2
    1,198,094
  • 0.3.1
    25,870
  • 0.3.0
    56
  • 0.2.0
    3,922
  • 0.1.0
    1,367,891

Package Sidebar

Install

npm i is-installed-globally

Weekly Downloads

11,190,007

Version

1.0.0

License

MIT

Unpacked Size

3.9 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus