tickle/modules/utils/isElement.mjs
2023-06-07 22:07:47 +02:00

12 lines
265 B
JavaScript

//@ts-check
/**
* Verifies an element is actually an element.
* @param {any} element
* @returns {element is HTMLElement}
*/
export const isElement = (element) => {
return element instanceof Element || element instanceof Document;
};
export default isElement