* @param {*} object The object to check. * @return {boolean} Whether or not the object is a DOM node.
(object)
| 375 | * @return {boolean} Whether or not the object is a DOM node. |
| 376 | */ |
| 377 | function isNode(object) { |
| 378 | var doc = object ? object.ownerDocument || object : document; |
| 379 | var defaultView = doc.defaultView || window; |
| 380 | return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string')); |
| 381 | } |
| 382 | |
| 383 | module.exports = isNode; |
| 384 | },{}],12:[function(require,module,exports){ |
no test coverage detected