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
    400,916
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    400,916
  • 0.4.0
    22,074,828
  • 0.3.2
    10,295,369
  • 0.3.1
    132,666
  • 0.3.0
    168
  • 0.2.0
    9,624
  • 0.1.0
    8,284,135

Package Sidebar

Install

npm i is-installed-globally

Weekly Downloads

8,369,231

Version

1.0.0

License

MIT

Unpacked Size

3.9 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus