index.js
function normalizeContent(content) {
  var fragment = document.createDocumentFragment();
  var i, len;

  if (isNode(content)) {
    return content;
  } else {
    len = content.length;
    for (i = 0; i < len; i++) { fragment.appendChild(content[i]); }
    return fragment;
  }
}
function normalizeContent(content) {
  var fragment = document.createDocumentFragment();
  var i, len;

  if (isNode(content)) {
    return content;
  } else {
    len = content.length;
    for (i = 0; i < len; i++) { fragment.appendChild(content[i]); }
    return fragment;
  }
}
function normalizeContent ( content ) { var fragment = document . createDocumentFragment ( ) ; var i , len ; if ( isNode ( content ) ) { return content ; } else { len = content . length ; for ( i = 0 ; i < len ; i ++ ) { fragment . appendChild ( content [ i ] ) ; } return fragment ; } }
Normalize a DOM Node or a collection of DOM Nodes. Returns a
documentFragment if the input is a collection.
@param {Node|NodeList|Array<Node>} content - the content to normalize
@return {Node}
Normalize a DOM Node or a collection of DOM Nodes . Returns a documentFragment if the input is a collection .