/** Removes nodes from `startNode` (inclusive) to `endMark` (exclusive). */ const remove = ( parent , startNode , endMark ) => { while ( startNode && startNode !== endMark ) { const n = startNode . nextSibling ; if ( parent === startNode . parentNode ) { parent . removeChild ( startNode ) ; } startNode = n ; } } ; export { remove } ;