UNPKG

@thi.ng/rdom

Version:

Lightweight, reactive, VDOM-less UI/DOM components with async lifecycle and @thi.ng/hiccup compatible

11 lines (10 loc) 326 B
import { implementsFunction } from "@thi.ng/checks/implements-function"; import { COMMENT } from "@thi.ng/hiccup/api"; const isComment = (tree) => tree[0] === COMMENT; const isComponent = (x) => implementsFunction(x, "mount"); const isElement = (x) => x instanceof Element; export { isComment, isComponent, isElement };