lib/utils.js
function parseArgs() {
  for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
    args[_key] = arguments[_key];
  }

  const l = args.length;
  const last = args[l - 1];
  let cb, opts, paths;
  if (_lodash2.default.isFunction(last)) {
    cb = last;
    args.pop(); // don't remove this semicolon

    var _parseArgs = parseArgs(...args);

    var _parseArgs2 = _slicedToArray(_parseArgs, 2);

    paths = _parseArgs2[0];
    opts = _parseArgs2[1];
  } else if (_lodash2.default.isObject(last) && !Array.isArray(last)) {
    opts = last;
    args.pop();
    paths = args;
  } else if (!last && l > 0) {
    args.pop();
    return parseArgs(...args);
  } else {
    paths = args;
  }
  return [_lodash2.default.compact(_lodash2.default.flatten(paths, true)), opts || {}, cb];
}
function parseArgs() {
  for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
    args[_key] = arguments[_key];
  }

  const l = args.length;
  const last = args[l - 1];
  let cb, opts, paths;
  if (_lodash2.default.isFunction(last)) {
    cb = last;
    args.pop(); // don't remove this semicolon

    var _parseArgs = parseArgs(...args);

    var _parseArgs2 = _slicedToArray(_parseArgs, 2);

    paths = _parseArgs2[0];
    opts = _parseArgs2[1];
  } else if (_lodash2.default.isObject(last) && !Array.isArray(last)) {
    opts = last;
    args.pop();
    paths = args;
  } else if (!last && l > 0) {
    args.pop();
    return parseArgs(...args);
  } else {
    paths = args;
  }
  return [_lodash2.default.compact(_lodash2.default.flatten(paths, true)), opts || {}, cb];
}
function parseArgs ( ) { for ( var _len = arguments . length , args = Array ( _len ) , _key = 0 ; _key < _len ; _key ++ ) { args [ _key ] = arguments [ _key ] ; } const l = args . length ; const last = args [ l - 1 ] ; let cb , opts , paths ; if ( _lodash2 . default . isFunction ( last ) ) { cb = last ; args . pop ( ) ; // don't remove this semicolon var _parseArgs = parseArgs ( ... args ) ; var _parseArgs2 = _slicedToArray ( _parseArgs , 2 ) ; paths = _parseArgs2 [ 0 ] ; opts = _parseArgs2 [ 1 ] ; } else if ( _lodash2 . default . isObject ( last ) && ! Array . isArray ( last ) ) { opts = last ; args . pop ( ) ; paths = args ; } else if ( ! last && l > 0 ) { args . pop ( ) ; return parseArgs ( ... args ) ; } else { paths = args ; } return [ _lodash2 . default . compact ( _lodash2 . default . flatten ( paths , true ) ) , opts || { } , cb ] ; }
Parse the arguments and return an special array.

@example
parseArgs(path)
// => [[path], {}, undefined]
parseArgs(path, cb)
// => [[path], {}, cb]
parseArgs(path, options)
// => [[path], options, undefined]
parseArgs(options)
// => [[], options, undefined]

@param {Array|ArrayLike} args
@return {Array} [ [path, path], {}, function ]
Parse the arguments and return an special array .