code: function (id) {
              var uninit = [], c = 0, ul, //array of components to init
              i = 0, l, comps, comp;
  
              //add multiple arguments
              if (arguments.length > 1) {
                  l = arguments.length;
                  for (; i < l; i++) {
                      uninit.push(arguments[i]);
                  }
                  //split components if contains comma
              } else if (id.indexOf(',') !== -1) {
                  comps = id.split(rlist);
                  l = comps.length;
                  for (; i < l; i++) {
                      uninit.push(comps[i]);
                  }
                  //single component passed
              } else {
                  uninit.push(id);
              }
  
              //extend the components
              ul = uninit.length;
              for (; c < ul; c++) {
                  if (this.__c[uninit[c]] == true)
                      continue
                  this.__c[uninit[c]] = true
                  comp = components[uninit[c]];
                  this.extend(comp);
                  //if constructor, call it
                  if (comp && "init" in comp) {
                      comp.init.call(this);
                  }
              }
  
              this.trigger("NewComponent", uninit);
              return this;
          }
docs: @
  #.addComponent
  @comp Crafty Core
  @sign public this .addComponent(String componentList)
  @param componentList - A string of components to add separated by a comma `,`
  @sign public this .addComponent(String Component1[, .., String ComponentN])
  @param Component# - Component ID to add.
  Adds a component to the selected entities or entity.
  
  Components are used to extend the functionality of entities.
  This means it will copy properties and assign methods to
  augment the functionality of the entity.
  
  There are multiple methods of adding components. Passing a
  string with a list of component names or passing multiple
  arguments with the component names.
  
  If the component has a function named `init` it will be called.
  
  @example
  ~~~
  this.addComponent("2D, Canvas");
  this.addComponent("2D", "Canvas");
  ~~~