code: function(elem) {
  		if (elem) {
  			while (isWhitespace(elem.firstChild)) {
  				// trim leading whitespace text nodes
  				elem.removeChild(elem.firstChild);
  			}
  			// trim leading whitespace text
  			trimPattern(elem.firstChild, LEADING);
  			while (isWhitespace(elem.lastChild)) {
  				// trim trailing whitespace text nodes
  				elem.removeChild(elem.lastChild);
  			}
  			// trim trailing whitespace text
  			trimPattern(elem.lastChild, TRAILING);
  		}
  	}
docs: Removes leading and trailing whitespace nodes
  
  @private
  @param {Node} elem The node