MCPcopy Create free account
hub / github.com/danielstocks/react-sortable / isNode

Function isNode

bundle.js:5391–5395  ·  view source on GitHub ↗
(object)

Source from the content-addressed store, hash-verified

5389var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
5390
5391function isNode(object) {
5392 var doc = object ? object.ownerDocument || object : document;
5393 var defaultView = doc.defaultView || window;
5394 return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
5395}
5396
5397module.exports = isNode;
5398

Callers 2

isTextNodeFunction · 0.70
validateFunction · 0.70

Calls 2

isValidElementFunction · 0.70
getIteratorFnFunction · 0.70

Tested by

no test coverage detected