function isCallbackOfArrayMethod(node){while(node){var parent=node.parent;switch(parent.type){/*
             * Looks up the destination. e.g.,
             * foo.every(nativeFoo || function foo() { ... });
             */case"LogicalExpression":case"ConditionalExpression":node=parent;break;// If the upper function is IIFE, checks the destination of the return value.
// e.g.
//   foo.every((function() {
//     // setup...
//     return function callback() { ... };
//   })());
case"ReturnStatement":{var func=astUtils.getUpperFunction(parent);if(func===null||!astUtils.isCallee(func)){return false;}node=func.parent;break;}// e.g.
//   Array.from([], function() {});
//   list.every(function() {});
case"CallExpression":if(astUtils.isArrayFromMethod(parent.callee)){return parent.arguments.length>=2&&parent.arguments[1]===node;}if(isTargetMethod(parent.callee)){return parent.arguments.length>=1&&parent.arguments[0]===node;}return false;// Otherwise this node is not target.
default:return false;}}/* istanbul ignore next: unreachable */return false;}//------------------------------------------------------------------------------
Checks whether or not a given node is a function expression which is the
callback of an array method.

@param {ASTNode} node - A node to check. This is one of
     FunctionExpression or ArrowFunctionExpression.
@returns {boolean} `true` if the node is the callback of an array method.