How to use the global-npm.version function in global-npm

To help you get started, we’ve selected a few global-npm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maxleiko / npmi / npmi.js View on Github external
} else {
                // check if package is installed
                checkInstalled(name.indexOf('/') !== -1);
            }
        }
    }

    npm.load(npmLoad, loadCallback);
};

npmi.LOAD_ERR    = LOAD_ERR;
npmi.INSTALL_ERR = INSTALL_ERR;
npmi.VIEW_ERR    = VIEW_ERR;

npmi.NPM_VERSION = npm.version;

module.exports = npmi;
github monaca / monaca-cli / src / info.js View on Github external
var displaySystem = function() {
      util.success('System\n');
      try {
        var os = getOperatingSystem(),
          nodeVersion = process.versions.node,
          npmVersion = npm.version;

        if (os) {
          util.print(util.alignContent('os') + os);
        }
        if (nodeVersion) {
          util.print(util.alignContent('node') + nodeVersion);
        }
        if (npmVersion) {
          util.print(util.alignContent('npm') + npmVersion + '\n');
        }
      } catch (err) {
        util.err('Failed displaying system info: ' + err);
      }
    };

global-npm

Require global npm as a local node module.

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis