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
12 lines (11 loc) • 342 B
JavaScript
import isDOMElement from './isDOMElement';
import isDOMFragment from './isDOMFragment';
/**
* Is the given object a DOM node that can contain child DOM nodes
*
* @param obj - The object to check
* @return Is it a DOM container or not
*/
export default function isDOMContainer(obj) {
return isDOMElement(obj) || isDOMFragment(obj);
}