code: function parseArgs() {
      var args = {};
      if (arguments.length === 1) {
        if (typeof arguments[0] === 'function') {
          args.fn = arguments[0];
        } else {
          args.options = arguments[0];
        }
      } else if (arguments.length === 2) {
        if (typeof arguments[0] === 'function') {
          args.fn = arguments[0];
          args.ctx = arguments[1];
        } else {
          args.options = arguments[0];
          args.fn = arguments[1];
        }
      } else {
        args.options = arguments[0];
        args.fn = arguments[1];
        args.ctx = arguments[2];
      }
      args.options = args.options || {};
      if (!args.options.strategy) {
        args.options.strategy = 'pre';
      }
      if (!walkStrategies[args.options.strategy]) {
        throw new Error('Unknown tree walk strategy. Valid strategies are \'pre\' [default], \'post\' and \'breadth\'.');
      }
      return args;
    }
docs: Parse the arguments of traversal functions. These functions can take one optional
  first argument which is an options object. If present, this object will be stored
  in args.options. The only mandatory argument is the callback function which can
  appear in the first or second position (if an options object is given). This
  function will be saved to args.fn. The last optional argument is the context on
  which the callback function will be called. It will be available in args.ctx.
  
  @returns Parsed arguments.