code: function(name) {
        var jCalLen = this.jCal[COMPONENT_INDEX].length;
        var i = 0;
  
        if (name) {
          var comps = this.jCal[COMPONENT_INDEX];
          var result = [];
  
          for (; i < jCalLen; i++) {
            if (name === comps[i][NAME_INDEX]) {
              result.push(
                this._hydrateComponent(i)
              );
            }
          }
          return result;
        } else {
          if (!this._components ||
              (this._hydratedComponentCount !== jCalLen)) {
            for (; i < jCalLen; i++) {
              this._hydrateComponent(i);
            }
          }
  
          return this._components || [];
        }
      }
docs: Finds all sub components, optionally filtering by name.
  
  @param {String=} name            Optional name to filter by
  @return {ICAL.Component[]}       The found sub components