1 # is-installed-globally [![Build Status](https://travis-ci.org/sindresorhus/is-installed-globally.svg?branch=master)](https://travis-ci.org/sindresorhus/is-installed-globally)
3 > Check if your package was installed globally
5 Can be useful if your CLI needs different behavior when installed globally and locally.
11 $ npm install is-installed-globally
18 const isInstalledGlobally = require('is-installed-globally');
20 // With `npm install your-package`
21 console.log(isInstalledGlobally);
24 // With `npm install --global your-package`
25 console.log(isInstalledGlobally);
32 - [import-global](https://github.com/sindresorhus/import-global) - Import a globally installed module
33 - [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module
34 - [global-dirs](https://github.com/sindresorhus/global-dirs) - Get the directory of globally installed packages and binaries
39 MIT © [Sindre Sorhus](https://sindresorhus.com)