code: function isEofNode(document, root) {
    if (!document || document.constructor.name !== "Document") {
      return true;
    }
  
    // In the `postcss-html` and `postcss-jsx` syntax, checks that there is text after the given node.
    let after;
  
    if (root === document.last) {
      after = _.get(document, "raws.afterEnd");
    } else {
      const rootIndex = document.index(root);
  
      after = _.get(document.nodes[rootIndex + 1], "raws.beforeStart");
    }
  
    return !(after + "").trim();
  }
docs: Checks whether the given node is the last node of file.
  @param {Document|null} document the document node with `postcss-html` and `postcss-jsx`.
  @param {Root} root the root node of css