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

Function isNode

code/new-context-api/public/app.js:505–509  ·  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

503 * @return {boolean} Whether or not the object is a DOM node.
504 */
505function isNode(object) {
506 var doc = object ? object.ownerDocument || object : document;
507 var defaultView = doc.defaultView || window;
508 return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
509}
510
511module.exports = isNode;
512},{}],16:[function(require,module,exports){

Callers 1

isTextNodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected