lib/capcon.js
function _wrapIntercept(func, stream, opts, exec) {
  var idex = Number(arguments.length > 3);
  var args = _shift(arguments[idex + 1], arguments[idex + 2]);

  opts = args[0];
  exec = args[1];

  opts.quiet = true;

  return idex
    ? func(stream, opts, exec)
    : func(opts, exec);
}
function _wrapIntercept(func, stream, opts, exec) {
  var idex = Number(arguments.length > 3);
  var args = _shift(arguments[idex + 1], arguments[idex + 2]);

  opts = args[0];
  exec = args[1];

  opts.quiet = true;

  return idex
    ? func(stream, opts, exec)
    : func(opts, exec);
}
Wraps capturing functions with quiet flags to
allow for interception.

@param func the function to delegate to.
@param stream a stream to listen on.
@param opts to set flags on the capture.
@param exec the function to call with the output.
@returns {*}
@private