dist/index.js
function removeUntilNode(currentNode, targetNode) {
    while (currentNode != targetNode) {
      if (!currentNode)
        throw 'Did not encounter target node';

      if (currentNode == self.bottomFold_)
        throw 'Encountered bottom fold before target node';

      var deadNode = currentNode;
      currentNode = currentNode.nextSibling;
      deadNode.parentNode.removeChild(deadNode);
    }
  }
function removeUntilNode(currentNode, targetNode) {
    while (currentNode != targetNode) {
      if (!currentNode)
        throw 'Did not encounter target node';

      if (currentNode == self.bottomFold_)
        throw 'Encountered bottom fold before target node';

      var deadNode = currentNode;
      currentNode = currentNode.nextSibling;
      deadNode.parentNode.removeChild(deadNode);
    }
  }
function removeUntilNode ( currentNode , targetNode ) { while ( currentNode != targetNode ) { if ( ! currentNode ) throw 'Did not encounter target node' ; if ( currentNode == self . bottomFold_ ) throw 'Encountered bottom fold before target node' ; var deadNode = currentNode ; currentNode = currentNode . nextSibling ; deadNode . parentNode . removeChild ( deadNode ) ; } }
Keep removing nodes, starting with currentNode, until we encounter targetNode.  Throws on failure.
Keep removing nodes starting with currentNode until we encounter targetNode . Throws on failure .