function isElement(node) {
  return !!(node &&
    (node.nodeName  // we are a direct element
    || (node.prop && node.attr && node.find)));  // we have an on and find method part of jQuery API
}
@ngdoc function
@name angular.isElement
@module ng
@function

@description
Determines if a reference is a DOM element (or wrapped jQuery element).

@param {*} value Reference to check.
@returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).