code: function() {
        function toJSON(item) {
          return item.toJSON();
        }
  
        var result = Object.create(null);
        result.ruleIterators = this.ruleIterators.map(toJSON);
  
        if (this.ruleDates) {
          result.ruleDates = this.ruleDates.map(toJSON);
        }
  
        if (this.exDates) {
          result.exDates = this.exDates.map(toJSON);
        }
  
        result.ruleDateInc = this.ruleDateInc;
        result.exDateInc = this.exDateInc;
        result.last = this.last.toJSON();
        result.dtstart = this.dtstart.toJSON();
        result.complete = this.complete;
  
        return result;
      }
docs: Converts object into a serialize-able format. This format can be passed
  back into the expansion to resume iteration.
  @return {Object}