code: function(toggle){
              var i = 0, l, comps;
              if (arguments.length > 1) {
                  l = arguments.length;
                          
                  for (; i < l; i++) {
                      if(this.has(arguments[i])){ 
                          this.removeComponent(arguments[i]);
                      }else{
                          this.addComponent(arguments[i]);
                      }
                  }
              //split components if contains comma
              } else if (toggle.indexOf(',') !== -1) {
                  comps = toggle.split(rlist);
                  l = comps.length;
                  for (; i < l; i++) {
                      if(this.has(comps[i])){ 
                          this.removeComponent(comps[i]);
                      }else{
                          this.addComponent(comps[i]);
                      }
                  }
                  
              //single component passed
              } else {
                  if(this.has(toggle)){ 
                      this.removeComponent(toggle);
                  }else{
                      this.addComponent(toggle);
                  }
              }
  
              return this;
          }
docs: @
  #.toggleComponent
  @comp Crafty Core
  @sign public this .toggleComponent(String ComponentList)
  @param ComponentList - A string of components to add or remove separated by a comma `,`
  @sign public this .toggleComponent(String Component1[, .., String componentN])
  @param Component# - Component ID to add or remove.
  Add or Remove Components from an entity.
  
  @example
  ~~~
  var e = Crafty.e("2D,DOM,Test");
  e.toggleComponent("Test,Test2"); //Remove Test, add Test2
  e.toggleComponent("Test,Test2"); //Add Test, remove Test2
  ~~~
  
  ~~~
  var e = Crafty.e("2D,DOM,Test");
  e.toggleComponent("Test","Test2"); //Remove Test, add Test2
  e.toggleComponent("Test","Test2"); //Add Test, remove Test2
  e.toggleComponent("Test");         //Remove Test
  ~~~