es-toolkit
Version:
A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.
14 lines (12 loc) • 363 B
TypeScript
/**
* Checks if `value` is likely a DOM element.
*
* @param {any} value The value to check.
* @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
*
* @example
* console.log(isElement(document.body)); // true
* console.log(isElement('<body>')); // false
*/
declare function isElement(value?: any): boolean;
export { isElement };