How to use the global-npm.load 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
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);
};

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