function hasTextValue(value) {
  return function (node) {
    return getTextContent(node) === value;
  };
}
Match the text inside an element, textnode, or comment

Note: nodeWalkAll with hasTextValue may return an textnode and its parent if
the textnode is the only child in that parent.