is-installed-globally
Check if your package was installed globally
Last updated 3 months ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install is-installed-globally 
SYNC missed versions from official npm registry.

is-installed-globally Build Status

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

Current Tags

  • 0.3.2                                ...           latest (3 months ago)

5 Versions

  • 0.3.2                                ...           3 months ago
  • 0.3.1                                ...           8 months ago
  • 0.3.0                                ...           10 months ago
  • 0.2.0                                ...           a year ago
  • 0.1.0                                ...           3 years ago

Copyright 2014 - 2016 © taobao.org |