lib/util/ast-utils.js
function isMethodWhichHasThisArg(node) {
    for (
        let currentNode = node;
        currentNode.type === "MemberExpression" && !currentNode.computed;
        currentNode = currentNode.property
    ) {
        if (currentNode.property.type === "Identifier") {
            return arrayMethodPattern.test(currentNode.property.name);
        }
    }

    return false;
}
function isMethodWhichHasThisArg(node) {
    for (
        let currentNode = node;
        currentNode.type === "MemberExpression" && !currentNode.computed;
        currentNode = currentNode.property
    ) {
        if (currentNode.property.type === "Identifier") {
            return arrayMethodPattern.test(currentNode.property.name);
        }
    }

    return false;
}
function isMethodWhichHasThisArg ( node ) { for ( let currentNode = node ; currentNode . type === "MemberExpression" && ! currentNode . computed ; currentNode = currentNode . property ) { if ( currentNode . property . type === "Identifier" ) { return arrayMethodPattern . test ( currentNode . property . name ) ; } } return false ; }
Checks whether or not a node is a method which has `thisArg`.
@param {ASTNode} node - A node to check.
@returns {boolean} Whether or not the node is a method which has `thisArg`.
Checks whether or not a node is a method which has thisArg .