lib/rules/callback-return.js
function containsOnlyIdentifiers(node) {
            if (node.type === "Identifier") {
                return true;
            }

            if (node.type === "MemberExpression") {
                if (node.object.type === "Identifier") {
                    return true;
                }
                if (node.object.type === "MemberExpression") {
                    return containsOnlyIdentifiers(node.object);
                }
            }

            return false;
        }
function containsOnlyIdentifiers(node) {
            if (node.type === "Identifier") {
                return true;
            }

            if (node.type === "MemberExpression") {
                if (node.object.type === "Identifier") {
                    return true;
                }
                if (node.object.type === "MemberExpression") {
                    return containsOnlyIdentifiers(node.object);
                }
            }

            return false;
        }
function containsOnlyIdentifiers ( node ) { if ( node . type === "Identifier" ) { return true ; } if ( node . type === "MemberExpression" ) { if ( node . object . type === "Identifier" ) { return true ; } if ( node . object . type === "MemberExpression" ) { return containsOnlyIdentifiers ( node . object ) ; } } return false ; }
Check to see if a node contains only identifers
@param {ASTNode} node The node to check
@returns {boolean} Whether or not the node contains only identifers
Check to see if a node contains only identifers