build/ical.js
function(component) {
      if (!this._components) {
        this._components = [];
        this._hydratedComponentCount = 0;
      }

      if (component.parent) {
        component.parent.removeSubcomponent(component);
      }

      var idx = this.jCal[COMPONENT_INDEX].push(component.jCal);
      this._components[idx - 1] = component;
      this._hydratedComponentCount++;
      component.parent = this;
      return component;
    }
function(component) {
      if (!this._components) {
        this._components = [];
        this._hydratedComponentCount = 0;
      }

      if (component.parent) {
        component.parent.removeSubcomponent(component);
      }

      var idx = this.jCal[COMPONENT_INDEX].push(component.jCal);
      this._components[idx - 1] = component;
      this._hydratedComponentCount++;
      component.parent = this;
      return component;
    }
function ( component ) { if ( ! this . _components ) { this . _components = [ ] ; this . _hydratedComponentCount = 0 ; } if ( component . parent ) { component . parent . removeSubcomponent ( component ) ; } var idx = this . jCal [ COMPONENT_INDEX ] . push ( component . jCal ) ; this . _components [ idx - 1 ] = component ; this . _hydratedComponentCount ++ ; component . parent = this ; return component ; }
Adds a single sub component.

@param {ICAL.Component} component        The component to add
@return {ICAL.Component}                 The passed in component
Adds a single sub component .