is-installed-globally

Check if your package was installed globally

MIT 7 个版本
安装
npm install is-installed-globally
yarn add is-installed-globally
pnpm add is-installed-globally
bun add is-installed-globally
README

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
版本列表
1.0.0 2023-11-06
0.4.0 2021-01-17
0.3.2 2020-04-06
0.3.1 2019-11-08
0.3.0 2019-09-18
0.2.0 2019-05-12
0.1.0 2017-06-25