vanillajs-browser-helpers
Version:
Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS in the browser
13 lines (12 loc) • 310 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Is the given object a DOM Node
*
* @param obj - The object to check
* @return Is it a DOM node or not
*/
function isDOMNode(node) {
return !!node && typeof node.nodeType !== 'undefined';
}
exports.default = isDOMNode;