packages/parse5-utils/src/index.js
/**
 * Removes element from the AST.
 * @param {ChildNode} node
 */
Removes element from the AST.
Removes element from the AST .
function remove(node) {
  const parent = node.parentNode;
  if (parent && parent.childNodes) {
    const idx = parent.childNodes.indexOf(node);
    parent.childNodes.splice(idx, 1);
  }
   (node).parentNode = undefined;
}
function remove ( node ) { const parent = node . parentNode ; if ( parent && parent . childNodes ) { const idx = parent . childNodes . indexOf ( node ) ; parent . childNodes . splice ( idx , 1 ) ; } ( node ) . parentNode = undefined ; }
Removes element from the AST.
Removes element from the AST .
/** @type {any} */