lib/input-generators/_base.js
function prepOptions (options, listener) {
  // Ensure defaults are represented
  common.ensure(options, defaults);

  // Normalize certain arguments if they are not functions.
  // The certain arguments are per-page options.
  // However, outputPath is a special case
  [
    "selector", "timeout", "useJQuery", "verbose", "phantomjsOptions"
  ]
  .forEach(function (perPageOption) {
    options[perPageOption] = normalize(options[perPageOption]);
    supplyMissingDefault(options, perPageOption);
  });

  options._inputEmitter = new EventEmitter();
  options._inputEmitter.on("input", listener);
}
function prepOptions (options, listener) {
  // Ensure defaults are represented
  common.ensure(options, defaults);

  // Normalize certain arguments if they are not functions.
  // The certain arguments are per-page options.
  // However, outputPath is a special case
  [
    "selector", "timeout", "useJQuery", "verbose", "phantomjsOptions"
  ]
  .forEach(function (perPageOption) {
    options[perPageOption] = normalize(options[perPageOption]);
    supplyMissingDefault(options, perPageOption);
  });

  options._inputEmitter = new EventEmitter();
  options._inputEmitter.on("input", listener);
}
Prepare options for use by an input generator.

@param {Object} options - Input generator options with or without defaults.
@param {Function} listener - The input generator listener.