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