is-installed-globally

Check if your package was installed globally

MIT License

Downloads
47.5M
Stars
71
Committers
5

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

Related

Package Rankings
Top 31.99% on Repo1.maven.org
Top 2.4% on Npmjs.org
Related Projects