code: function removePreservingDescendants(node) {
  	if (node.hasChildNodes()) {
  		splitParent([].slice.call(node.childNodes));
  	} else {
  		node.parentNode.removeChild(node);
  	}
  }
docs: "To remove a node node while preserving its descendants, split the parent of node's children if it has any. If it has no children, instead remove it from its parent."