isComment
import { isComment } from "jsr:@ende/xml";function
function isComment(node: XmlNode): node is XmlCommentNodeType guard to check if a node is a comment.
node: XmlNodeThe XML node to check.
Returns
true if the node is a comment, false otherwise.
Example: Usage
import { isComment } from "@ende/xml/types";
import { assertEquals } from "@ende/assert";
const node = { type: "comment" as const, text: "A comment" };
assertEquals(isComment(node), true);