code: function optimizeAttributes(attrs) {
  		// clone all attributes to make sure that original objects are 
  		// not modified
  		attrs = attrs.map(function(attr) {
  			return utils.clone(attr);
  		});
  		
  		var lookup = {};
  
  		return attrs.filter(function(attr) {
  			if (!(attr.name in lookup)) {
  				return lookup[attr.name] = attr;
  			}
  			
  			var la = lookup[attr.name];
  			
  			if (attr.name.toLowerCase() == 'class') {
  				la.value += (la.value.length ? ' ' : '') + attr.value;
  			} else {
  				la.value = attr.value;
  				la.isImplied = !!attr.isImplied;
  			}
  			
  			return false;
  		});
  	}
docs: Optimize attribute set: remove duplicates and merge class attributes
  @param attrs