Finds the parent React component of `node`.

@param {*} node
@return {?DOMEventTarget} Parent container, or `null` if the specified node
is not nested.
774109
function findParent(node) {
  // TODO: It may be a good idea to cache this to prevent unnecessary DOM
  // traversal, but caching is difficult to do correctly without using a
  // mutation observer to listen for all DOM changes.
  var nodeID = ReactMount.getID(node);
  var rootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);
  var container = ReactMount.findReactContainerForID(rootID);
  var parent = ReactMount.getFirstReactDOM(container);
  return parent;
}
1011430
function findToken(node, test) {
    let find = null
    traverse(node, {
        enter(child) {
            if (test(child)) {
                find = child
                this.break()
            }
        },
    })
    return find
}
1096887
function  (node, attributeName) {
			if(!node){
				return null;
			}
			if(this.hasAttribute(node, attributeName)){
				return this.getAttribute(node, attributeName);
			}else{
				var parent = node.parentNode;
				if(parent){
					return this.getFirstAncestorAttribute(parent, attributeName);
				}else{
					return null;
				}
			}
		}
1034386
public static String parent(String node) {
        final int index = node.lastIndexOf('/');
        if (index < 0)
            return null;
        return node.substring(0, index);
    }
390924
function(node) {
            var parent = node.getParent();
            while(parent) {
                if(parent._id === this._id) {
                    return true;
                }
                parent = parent.getParent();
            }

            return false;
        }
239472
function (node) {
      if (!node.parent) {
        return false;
      }
      return /^(React\.)?createClass$/.test(sourceCode.getText(node.parent.callee));
    }
1146475
function(node) {
    if (node.nodeType !== 1) {
      // Not a DOMElement, therefore not a React component
      return false;
    }
    var id = ReactMount.getID(node);
    return id ? id.charAt(0) === SEPARATOR : false;
  }
1237933
function removeChild(node) {
    if (tree.Logical.getParentNode(node) !== this) {
      throw Error('The node to be removed is not a child of this node: ' +
        node);
    }
    if (!mixinImpl.removeNode(node)) {
      // if removing from a shadyRoot, remove form host instead
      var container = isShadyRoot(this) ?
        this.host :
        this;
      // not guaranteed to physically be in container; e.g.
      // undistributed nodes.
      var parent = tree.Composed.getParentNode(node);
      if (container === parent) {
        tree.Composed.removeChild(container, node);
      }
    }
    mixinImpl._scheduleObserver(this, null, node);
    return node;
  }
375769
function findParent(element, options) {
          var parent = options.parent;

          // 
          if (angular.isFunction(parent)) {
            parent = parent(options.scope, element, options);
          } else if (angular.isString(parent)) {
            parent = angular.element($document[0].querySelector(parent));
          } else {
            parent = angular.element(parent);
          }

          // If parent querySelector/getter function fails, or it's just null,
          // find a default.
          if (!(parent || {}).length) {
            var el;
            if ($rootElement[0] && $rootElement[0].querySelector) {
              el = $rootElement[0].querySelector(':not(svg) > body');
            }
            if (!el) el = $rootElement[0];
            if (el.nodeName == '#comment') {
              el = $document[0].body;
            }
            return angular.element(el);
          }

          return parent;
        }
1173771
function findClosestParent(startElement, fn) {
            var parent = startElement.parentElement;
            if (!parent) {
                return undefined;
            }
            return fn(parent) ? parent : findClosestParent(parent, fn);
        }
703934
function(element, selector, event, callback, capturePhase) {
    const delegateElement = $(element).array[0]
    $(element).forEach(function(ctx) {
      $(ctx).on(event, function(e) {
        let target = e.target
        if (e.target.nodeType === 3) {
          target = e.target.parentNode
        }
        $(ctx).find(selector).forEach(function(delegateElement) {
          if (delegateElement === target) {
            callback.call(delegateElement, e)
          } else {
            try {
              const ancestor = $(target).closest(selector)
              if (delegateElement === ancestor.array[0]) {
                callback.call(delegateElement, e)
              }
            } catch (err) {}
          }
        })
      }, capturePhase)
    })
  }
895689
function wrapInView(node) {
  if (!node) {
    return node;
  }
  if (typeof node === 'function') {
    // React.Children does not traverse functions.
    // All render callbacks must be protected under a <View>
    return createElement(View, {}, node);
  }
  if (Array.isArray(node)) {
    return node.map(wrapInView);
  }
  if (inheritsFrom(node.type, View)) {
    return node;
  }
  return node;
}
611811
static boolean isTryCatchNodeContainer(Node n) {
    Node parent = n.getParent();
    return parent.isTry()
        && parent.getSecondChild() == n;
  }
148205
function _getOuterContainerOrSelf(node) {
    var /** @type {?} */ view = node.view;
    while (_isNgContainer(node.parent, view)) {
        node = node.parent;
    }
    return node;
}
993293
function findParentContentEditable(node) {
          var parent = node;

          while (parent) {
            if (parent.nodeType === 1 && getContentEditable(parent)) {
              return getContentEditable(parent) === "false" ? parent : node;
            }

            parent = parent.parentNode;
          }

          return node;
        }
1291318
function pnodeParent (pnode) {
        if (!pnode.valid) return undefined
        var parentPath = parents.immediate(pnode.path)
        return parentPath ? ptree(parentPath) : null
    }
829029
function getComponentName(node) {

  // var Hello = React.createClass({ ... });
  if (
    node.parent && node.parent.parent &&
    node.parent.parent.type === 'VariableDeclarator' &&
    node.parent.parent.id.name) {
    return node.parent.parent.id.name;
  }

  // class Hello extends React.Component { }
  if (node.type === 'ClassDeclaration' &&
    node.id.type === 'Identifier' &&
    node.id.name) {
    return node.id.name;
  }

  // var DontLook = function() { return (<div>Hello {this.props.name}</div>); };
  if (
    node.parent && node.parent.id &&
    (node.type === 'FunctionExpression' ||
    node.type === 'ArrowFunctionExpression') &&
    node.id === null &&
    node.parent.type === 'VariableDeclarator' &&
    node.parent.id.type === 'Identifier') {
    return node.parent.id.name;
  }

  // function FolksWolves() { return (<div>Hello {this.props.name}</div>); }
  if (
    node.type === 'FunctionDeclaration' &&
    node.id) {
    return node.id.name;
  }

  return null;
}