index.js
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;
}
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;
}
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 ; }
Convert args list to a config object.
Convert args list to a config object .