12 lines
249 B
JavaScript
12 lines
249 B
JavaScript
"use strict";
|
|
|
|
function isDOMElement(obj) {
|
|
return (obj == null ? void 0 : obj.nodeType) === Node.ELEMENT_NODE;
|
|
}
|
|
|
|
/**
|
|
* Check if an object is a DOM element. Duck-typing based on `nodeType`.
|
|
*
|
|
* @param {*} obj
|
|
*/
|
|
module.exports = isDOMElement; |