code: function assertOptions(options) {
    if (!elv(options)) {
      return {
        report: defaultReporter,
        runs: 10,
        stream: process.stdout,
        thresholds: null,
      };
    }
  
    if (typeof options !== 'object') {
      throw new TypeError();
    }
  
    const report = elv.coalesce(options.reporter, () => defaultReporter);
  
    const runs = elv.coalesce(options.runs, 10);
    const stream = elv.coalesce(options.stream, process.stdout);
    const thresholds = assertThresholds(options.thresholds);
  
    if (typeof report !== 'function') {
      throw new TypeError(msg.argReporter);
    }
  
    if (!Number.isInteger(runs) || runs < 1) {
      throw new TypeError(msg.argRuns);
    }
  
    if (typeof stream.write !== 'function') {
      throw new TypeError(msg.argStream);
    }
  
    return {
      report,
      runs,
      stream,
      thresholds,
    };
  }
docs: Validates the options provided to the bench method.  If it is invalid a
  TypeError is thrown. Otherwise a normalized {BenchOptions} object is
  returned.
  
  @param {BenchOptions} options
  
  @returns {BenchOptions}