Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (name.indexOf('/') === -1) {
// not a tarball
npm.commands.install(installPath, [name+'@'+version], installCallback);
} else {
// do not specify version for tarball
npm.commands.install(installPath, [name], installCallback);
}
} else {
// check if package is installed
checkInstalled(name.indexOf('/') !== -1);
}
}
}
npm.load(npmLoad, loadCallback);
};