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
17 lines (16 loc) • 556 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var isDOMNode_1 = __importDefault(require("./isDOMNode"));
/**
* Is the given object a DOM node child of a DOM element
*
* @param obj - The object to check
* @return Is it a DOM child node or not
*/
function isDOMChildNode(node) {
return isDOMNode_1.default(node) && node.parentElement != null;
}
exports.default = isDOMChildNode;