is-installed-globally

Check if your package was installed globally


Keywords
global, package, globally, module, install, installed, npm, yarn, is, check, detect, local, locally, cli, bin, binary
License
MIT
Install
npm install is-installed-globally@1.0.0

Documentation

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