code: function toObject(src, dest, options) {
    if (!utils.isObject(options)) {
      options = {};
    }
  
    var config = {};
    if (utils.isObject(dest)) {
      options = extend({}, options, dest);
      dest = null;
    }
  
    if (utils.isObject(src)) {
      config = src;
    }
  
    if (isValidSrc(src)) {
      config.src = src;
    } else if (Array.isArray(src)) {
      config = normalize(src);
    }
  
    if (typeof dest === 'string') {
      config.dest = dest;
    }
  
    if (options.hasOwnProperty('options')) {
      options = extend({}, options, options.options);
      delete options.options;
    }
  
    config.options = extend({}, config.options, options);
    return config;
  }
docs: Convert args list to a config object.