npm.io
1.0.1 • Published 1 week ago

is-installed-globally

Licence
MIT
Version
1.0.1
Deps
2
Size
5 kB
Vulns
0
Weekly
0
Stars
72

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