is-installed-globally ![Build Status](https://camo.githubusercontent.com/87106bd30019bcfc35c97f495f85a404aa1318a141250c2f070eda9b7873d00a/68747470733a2f2f7472617669732d63692e6f72672f73696e647265736f726875732f69732d696e7374616c6c65642d676c6f62616c6c792e7376673f6272616e63683d6d6173746572)
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
const isInstalledGlobally = require('is-installed-globally');
// With `npm install your-package`
console.log(isInstalledGlobally);
//=> false
// With `npm install --global your-package`
console.log(isInstalledGlobally);
//=> true
Related
- import-global - Import a globally installed module
- resolve-global - Resolve the path of a globally installed module
- global-dirs - Get the directory of globally installed packages and binaries