npm.io
1.0.0 • Published 2 years ago

is-installed-globally

Licence
MIT
Version
1.0.0
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
71

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

Keywords