sindresorhus / is-installed-globally

Check if your package was installed globally

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Check if your package was installed globally

License:MIT License


Languages

Language:JavaScript 95.6%Language:TypeScript 4.4%