code: function replace(node, nodeName) {
    if (node.nodeName.toUpperCase() === nodeName.toUpperCase()) {
      return node;
    }
  
    const newNode = create(nodeName);
  
    if (node.style.cssText) {
      newNode.style.cssText = node.style.cssText;
    }
  
    appendChildNodes(newNode, lists.from(node.childNodes));
    insertAfter(newNode, node);
    remove(node);
  
    return newNode;
  }
docs: @method replace
  
  replace node with provided nodeName
  
  @param {Node} node
  @param {String} nodeName
  @return {Node} - new node