lib/git-status-checker.js
function GitStatusChecker(options) {
  if (options && typeof options !== 'object') {
    throw new TypeError('options must be an object');
  }

  options = Object.assign(
    {
      in: process.stdin,
      out: process.stdout,
      err: process.stderr
    },
    options
  );

  if (!options.in || typeof options.in.read !== 'function') {
    throw new TypeError('options.in must be a stream.Readable');
  }
  if (!options.out || typeof options.out.write !== 'function') {
    throw new TypeError('options.out must be a stream.Writable');
  }
  if (!options.err || typeof options.err.write !== 'function') {
    throw new TypeError('options.err must be a stream.Writable');
  }

  this._options = options;
  this._chalk = new Chalk({
    enabled: Boolean(
      options.interactive !== undefined
        ? options.interactive
        : options.out.isTTY
    )
  });
}
function GitStatusChecker(options) {
  if (options && typeof options !== 'object') {
    throw new TypeError('options must be an object');
  }

  options = Object.assign(
    {
      in: process.stdin,
      out: process.stdout,
      err: process.stderr
    },
    options
  );

  if (!options.in || typeof options.in.read !== 'function') {
    throw new TypeError('options.in must be a stream.Readable');
  }
  if (!options.out || typeof options.out.write !== 'function') {
    throw new TypeError('options.out must be a stream.Writable');
  }
  if (!options.err || typeof options.err.write !== 'function') {
    throw new TypeError('options.err must be a stream.Writable');
  }

  this._options = options;
  this._chalk = new Chalk({
    enabled: Boolean(
      options.interactive !== undefined
        ? options.interactive
        : options.out.isTTY
    )
  });
}
Options for {@link GitStatusChecker}.

@typedef {{
err: stream.Writable|undefined,
in: stream.Readable|undefined,
interactive: boolean|undefined,
out: stream.Writable|undefined
}} GitStatusCheckerOptions
@property {stream.Writable=} err Stream to which errors (and non-output
status messages) are written. (default: <code>process.stderr</code>)
@property {stream.Readable=} in Stream from which input is read. (default:
<code>process.stdin</code>)
@property {boolean=} interactive Be interactive and colorful
@property {stream.Writable=} out Stream to which output is written.
(default: <code>process.stdout</code>)
 var GitStatusCheckerOptions; Creates a status checker for the current git repository.

@constructor
@param {GitStatusCheckerOptions=} options Options.