MCPcopy Create free account
hub / github.com/Unitech/pm2 / moduleExistInLocalDB

Function moduleExistInLocalDB

lib/API/Modules/NPM.js:157–163  ·  view source on GitHub ↗
(CLI, module_name, cb)

Source from the content-addressed store, hash-verified

155}
156
157function moduleExistInLocalDB(CLI, module_name, cb) {
158 var modules = Configuration.getSync(cst.MODULE_CONF_PREFIX);
159 if (!modules) return cb(false);
160 var module_name_only = Utility.getCanonicModuleName(module_name)
161 modules = Object.keys(modules);
162 return cb(modules.indexOf(module_name_only) > -1 ? true : false);
163};
164
165function install(CLI, module_name, opts, cb) {
166 moduleExistInLocalDB(CLI, module_name, function (exists) {

Callers 1

installFunction · 0.85

Calls 2

cbFunction · 0.85
indexOfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…