a post-component library for building user-interfaces on the web.
1export type Cleanup = (() => void) | void | undefined | null
2
3export function is_element(node: Node): node is Element {
4 return node.nodeType === (1 satisfies typeof Node.ELEMENT_NODE)
5}
6
7export function is_comment(node: Node): node is Comment {
8 return node.nodeType === (8 satisfies typeof Node.COMMENT_NODE)
9}
10
11export function is_document_fragment(node: Node): node is DocumentFragment {
12 return node.nodeType === (11 satisfies typeof Node.DOCUMENT_FRAGMENT_NODE)
13}