MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / isNode

Function isNode

code/composition/public/app.js:642–646  ·  view source on GitHub ↗

* @param {*} object The object to check. * @return {boolean} Whether or not the object is a DOM node.

(object)

Source from the content-addressed store, hash-verified

640 * @return {boolean} Whether or not the object is a DOM node.
641 */
642function isNode(object) {
643 var doc = object ? object.ownerDocument || object : document;
644 var defaultView = doc.defaultView || window;
645 return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
646}
647
648module.exports = isNode;
649},{}],15:[function(require,module,exports){

Callers 2

isTextNodeFunction · 0.70
validateFunction · 0.70

Calls 2

isValidElementFunction · 0.70
getIteratorFnFunction · 0.70

Tested by

no test coverage detected