is-installed-globally
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

/is-installed-globally/

    Package Sidebar

    Install

    npm i is-installed-globally

    Weekly Downloads

    11,190,007

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.9 kB

    Total Files

    5

    Last publish

    Collaborators

    • sindresorhus