docs: function parseArgs() {
      var expansions = {};
      var processArgs = null;
      for (var i = 0; i < arguments.length; i++) {
          if (typeof arguments[i] === 'undefined') {
              continue;
          }
          if (Array.isArray(arguments[i])) {
              processArgs = arguments[i]
          } else if (typeof arguments[i] === 'object') {
              expansions = arguments[i]
          }
      }
      var result = {};
      var args = processArgs || process.argv.slice(2);
      if (!args || args.length === 0) {
          return {};
      }
      //expend, e.g. -pvq to -p -v -q
      args = preprocessArgs(args);
      var previous;
      for (var i = 0; i < args.length; i++) {
          var arg = args[i]
          var shortPattern = /^\-(\w)$/
          if (shortPattern.test(arg)) {
              var letter = shortPattern.exec(arg)[1]
              if (expansions && shortPattern.test(arg)) {
                  if (typeof expansions[letter] !== 'undefined') {
                      arg = '--' + expansions[letter]
                      previous = expansions[letter]
                  } else {
                      result[letter] = true
                      previous = letter
                      continue
                  }
              } else {
                  result[letter] = true
                  previous = letter
                  continue
              }
          }
          //we've now substituted in, e.g. --foo for -foo'
          var optPattern = /^\-\-(\w.*?)$/;
          if (optPattern.test(arg)) {
              var name = optPattern.exec(arg)[1];
              result[name] = true;
              previous = name;
              continue;
          }
          if (previous) {
              result[previous] = arg;
              previous = null;
          } else {
              result[arg] = true;
          }
      }
      return undot(result);
  }