Get a NPM client that does minimal console spam
NPM Erorrs and warnings will still be sent to the console.
173729
function () {
        let noop = function () { };
        let log = {
            error: npmlog.error,
            warn: npmlog.warn,
            info: noop,
            verbose: noop,
            silly: noop,
            http: noop,
            pause: noop,
            resume: noop
        };
        return new RegClient({ log: log });
    }
987316
function next( error, online ) {
		if ( !online ) {
			// Error on the side of assuming that the name is available...
			return clbk( null, true );
		}
		npmName( name, done );
	}
48336
function warning(message) {
  /* eslint-disable no-console */
  if (typeof console !== 'undefined' && typeof console.error === 'function') {
    console.error(message);
  }
  /* eslint-enable no-console */
  try {
    // This error was thrown as a convenience so that if you enable
    // "break on all exceptions" in your console,
    // it would pause the execution at this line.
    throw new Error(message);
    /* eslint-disable no-empty */
  } catch (e) {}
  /* eslint-enable no-empty */
}
961150
function warn() {
    var args = Array.prototype.slice.apply(arguments);

    if (typeof console !== undefined && console.warn) {
      console.warn.apply(console, args);
    }
  }
103253
function npmInstall() {
  return installer.install(Array.prototype.slice.call(arguments), function(errs) {
    if (errs) {
      return out.error("error : %j", errs);
    }
    return out.success("plugins installed");
  });
}
619943
function notify () {
  debug('run checker')
  debug(`ELINT_DISABLE_UPDATE_NOTIFIER: ${process.env.ELINT_DISABLE_UPDATE_NOTIFIER}`)

  if (process.env.ELINT_DISABLE_UPDATE_NOTIFIER === 'true') {
    return Promise.resolve(null)
  }

  return checker().then(result => {
    if (!result || !result.name || !result.latest || !result.current) {
      return null
    }

    conf.update(result.name)

    return report(result)
  })
}
193125
function handleMismatch(results, config) {
  if (results.length) {
    var message = 'Out of date packages: \n' + results.map(function (p) {
      return moduleInfo(p);
    }).join('\n');
    if (config.throw === undefined || config.throw !== undefined && config.throw) {
      throw new _gulpUtil.PluginError('gulp-npm-check', {
        name: 'NpmCheckError',
        message: message
      });
    } else {
      (0, _gulpUtil.log)(_gulpUtil.colors.yellow('gulp-npm-check\n', message));
    }
  } else {
    (0, _gulpUtil.log)('All packages are up to date :)');
  }
}
954497
function Detect(config) {
	var events = [];
	var api = {};
	var sysPackages = [];
	var numSysCmds = config.sysCmds.length;
	var numTests = 0;	// test counter

	// require detectionizr module(s)
	config.use.forEach(r, api);

	process.on("exit", function cleanup() {
		events.forEach(function(e,i,all) {
			all[i] = null;	// explicitly de-reference
		})
		events.splice(0, events.length);	// empty array
	});

	// public api
	api.require = r;
	api.detect = function(tests) {
		numTests = tests.length;
  		tests.forEach(detect, api);
  		return api;
	}
	api.on = function(event, fn, scope) {
		events.push([event, fn, scope]);
		return api;
	}
	api.overwrite = function(event, fn, scope) {
		events.forEach(function(e,i,all) {
			if(event === e)
				all.splice(i,1);
		});
		return api.on(event, fn, scope);
	}

	api.on("detect", function() {
		if(numTests === 1)
			events.forEach(function(event) {
				if(event[0] === "finally")
					event[1].call(event[2], api);
			});
	});

	return api;

	function detect(package) {
		//console.log(test);
		if(!r(package)) {
			if(api.child_process) {
				sysPackages.push([package, 0]);
				config.sysCmds.forEach(function(cmd) {
					sysProcess(package, cmd);
				});
			} else {
				console.warn("Weird butt nodejs distro - can not test non NPM packages.");
			}
		} else {
			numTests--;	// reduce test counter
			events.forEach(function(event) {
				if(event[0] === "detect")
					event[1].call(event[2], package, true);
			});
		}
	}

	function sysProcess(package, cmd) {
		var proc = api.child_process.spawn(cmd[0], cmd[1] ? [cmd[1], package] : [package]);
		proc.stdout.setEncoding("utf8");
		proc.stdout.on("data", sysHandler);
//		proc.stderr.on("data", sysHandler);
		proc.stdout.on('end', sysCounter);

		function sysHandler(input) {
			//console.log(input);
			if(input.length > 0) api[package] = true;
		}

		function sysCounter() {
			sysPackages.some(function find(syspackage) {
				if( syspackage[0] === package ) {
					syspackage[1]++;
//console.dir(sysPackages)
//console.log("%s has been tested %d times out of %d", package, syspackage[1], numSysCmds);
					if( numSysCmds === syspackage[1] ) {
						events.forEach(function(event) {
							if(event[0] === "detect")
								event[1].call(event[2], package, api[package]);
						});
						numTests--;	// reduce test counter
						return true;	// stop loop
					}
				}
			});
		}
	}

	function r(package) {
		try {
			api[package] = require(package);
		} catch(err) {
			//console.warn(err.toString());
			api[package] = false;
		} finally {
			return api[package];
		}
	}
}
1230339
function execDependencyInstall () {

	console.log('\nExecuting npm install command...');

	return new Promise(function(resolve, reject){

		var child = require('child_process').spawn('npm', ['install'], {
			cwd: process.cwd,
			detached: false,
			env: process.env,
			stdio: [process.stdin, process.stdout, process.stderr]
		});

		child.on('error', function (error) {
			console.error(colors.bold.red('ERROR: Could not install the required modules:'));
			console.error(error.stack.toString());
			process.exit(255);
		});

		child.on('close', function (exit_code) {
			if (exit_code !== 0) {
				console.error(colors.bold.red('\nERROR: npm install has been failed.'));
				process.exit(255);
			}
			console.log('\nnpm install has been completed.\n\n');
			resolve(true);
		});

	});

}
1245231
function getInvalidIncludesError (message) {
  var error = new Error(
    message || 'JSON API resource does not support `include`'
  )
  error.statusCode = statusCodes.BAD_REQUEST
  error.code = statusCodes.BAD_REQUEST
  error.status = statusCodes.BAD_REQUEST

  return error
}
1046560
function usage() {
        console.log("Audit installed packages and their dependencies to identify known");
        console.log("vulnerabilities.");
        console.log();
        console.log("If a package.json file is specified as an argument, only the dependencies in");
        console.log("the package file will be audited.");
        console.log();
        console.log(colors.bold.yellow("Limitations"));
        console.log();
        console.log("As this program depends on the OSS Index database, network access is");
        console.log("required. Connection problems with OSS Index will result in an exception.");
        console.log();
        console.log("The vulnerabilities do not always indicate all (or any) of the affected");
        console.log("versions it is best to read the vulnerability text itself to determine");
        console.log("whether any particular version is known to be vulnerable.");
}
1010085
function initNPM() {
    if (npmIsReady) return npmIsReady;

    npmIsReady = Promise.nfcall(npm.load, {
        silent: true,
        loglevel: 'silent'
    });

    return npmIsReady;
}
458534
function postProcess( errorCode ) {
	if ( errorCode ) {
		console.error( `running npm for installing missing dependencies ${collected.join( ", " )} exited on error (${errorCode})` );
	} else if ( exec ) {
		const cmd = exec.join( " " );

		if ( !quiet ) {
			console.error( `invoking follow-up command: ${cmd}` );
		}

		const followup = Child.exec( cmd );

		followup.stdout.pipe( process.stdout );
		followup.stderr.pipe( process.stderr );

		followup.on( "exit", code => {
			process.exit( code );
		} );

		return;
	}

	process.exit( errorCode );
}
372519
function npmInstall(settings) {
  const message = logger.promise('Running npm install (can take several minutes)');

  const installArgs = {};

  if (settings) {
    if (settings.path) {
      installArgs.cwd = settings.path;
    }

    if (settings.stdio) {
      installArgs.stdio = settings.stdio;
    }
  }

  const npmProcess = spawn('npm', ['install'], installArgs);

  return new Promise((resolve, reject) => {
    npmProcess.on('exit', (code) => {
      if (code !== 0) {
        message.fail();
        reject('npm install failed.');
        return;
      }

      message.succeed();
      resolve();
    });
  });
}
173603
function runSimpleUpgrade (version) {
  return new Promise((resolve) => {
    let npmCommand = (version) ? `npm install -g npm@${version}` : 'npm install -g npm'
    let stdout = []
    let stderr = []
    let child

    try {
      child = spawn('powershell.exe', [ '-NoProfile', '-NoLogo', npmCommand ])
    } catch (error) {
      // This is dirty, but the best way for us to try/catch right now
      resolve({ error })
    }

    child.stdout.on('data', (data) => stdout.push(data.toString()))
    child.stderr.on('data', (data) => stderr.push(data.toString()))

    child.on('exit', () => resolve({ stderr, stdout }))

    child.stdin.end()
  })
}
1106183
def version
      stdout, exit_status = Open3.capture2 "node", "--eval", \
        "console.log(require(#{ JSON.dump(File.join(npm_package_path, "package.json")) }).version)"

      if exit_status.success?
        stdout.strip
      else
        raise engine::CompilerError, \
          %{Failed to get #{ engine.name } version. Perhaps, the problem with Node.js runtime.}
      end
    end
1148938
function() {

			// origRepo is not defined if dist was skipped
			Release.dir.repo = Release.dir.origRepo || Release.dir.repo;
			return npmTags();
		}