tickle/modules/utils/isElement.mjs

12 lines
265 B
JavaScript
Raw Normal View History

2023-06-07 20:07:47 +00:00
//@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