code: function npm(cmd, names, cb) {
    if (typeof cb !== 'function') {
      throw new TypeError('expected callback to be a function');
    }
  
    if (typeof names === 'string') {
      names = [names];
    }
  
    if (!Array.isArray(names)) {
      cb(new TypeError('expected names to be a string or array'));
      return;
    }
  
    var args = arrayify(cmd).concat(names);
    spawn('npm', args, {stdio: 'inherit'})
      .on('error', cb)
      .on('close', function(code, err) {
        cb(err, code);
      });
  }
docs: Execute `npm --global` with the given command and one or more package names.
  This is the base for [install]() and [uninstall]().
  
  ```js
  npm('install', 'verb', function(err) {
  if (err) throw err;
  });
  ```
  @param {String|Array} `names` One or more package names.
  @param {Function} `cb` Callback
  @api public