Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} 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;
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);
}
};