elearning/Frontend-Learner/node_modules/is-installed-globally
2026-01-13 10:48:02 +07:00
..
index.d.ts Website Structure 2026-01-13 10:48:02 +07:00
index.js Website Structure 2026-01-13 10:48:02 +07:00
license Website Structure 2026-01-13 10:48:02 +07:00
package.json Website Structure 2026-01-13 10:48:02 +07:00
readme.md Website Structure 2026-01-13 10:48:02 +07:00

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