index.js
function flush(options) {
  options = _.defaults(options || {}, {
    stdout: true,
    stderr: true
  });

  var flushed = {};

  if (options.stdout) {
    flushed.stdout = cachedData.stdout;
    cachedData.stdout = [];
  }

  if (options.stderr) {
    flushed.stderr = cachedData.stderr;
    cachedData.stderr = [];
  }

  return flushed;
}
function flush(options) {
  options = _.defaults(options || {}, {
    stdout: true,
    stderr: true
  });

  var flushed = {};

  if (options.stdout) {
    flushed.stdout = cachedData.stdout;
    cachedData.stdout = [];
  }

  if (options.stderr) {
    flushed.stderr = cachedData.stderr;
    cachedData.stderr = [];
  }

  return flushed;
}
function flush ( options ) { options = _ . defaults ( options || { } , { stdout : true , stderr : true } ) ; var flushed = { } ; if ( options . stdout ) { flushed . stdout = cachedData . stdout ; cachedData . stdout = [ ] ; } if ( options . stderr ) { flushed . stderr = cachedData . stderr ; cachedData . stderr = [ ] ; } return flushed ; }
Flush collected data.

@param {object} [options] Options
@param {boolean} [options.stdout=true] Mock stdout
@param {boolean} [options.stderr=true] Mock stderr
@returns {object} Object containing two array corresponding to outputs.
Flush collected data .