js/ka-validator.js
/**
     * Checks if the AST has the specified node type
     * @param {Object} ast - The Abstract Syntax Tree object created by the parseCode method
     * @param {string} nodeType - The node type being searched for (eg. 'IfStatement')
     * @return {Object|boolean} returns the node or falsy value if not found
     */
Checks if the AST has the specified node type
@param {Object} ast - The Abstract Syntax Tree object created by the parseCode method
@param {string} nodeType - The node type being searched for
@return {Object|boolean} returns the node or falsy value if not found
Checks if the AST has the specified node type @param { Object } ast - The Abstract Syntax Tree object created by the parseCode method @param { string } nodeType - The node type being searched for @return { Object|boolean } returns the node or falsy value if not found
function hasNodeType(ast, nodeType) {
        if (ast) {
            return walk.findNodeAt(ast, null, null, nodeType);
        }
        return false;
    }
function hasNodeType ( ast , nodeType ) { if ( ast ) { return walk . findNodeAt ( ast , null , null , nodeType ) ; } return false ; }
Checks if the AST has the specified node type
 @param {Object} ast - The Abstract Syntax Tree object created by the parseCode method
 @param {string} nodeType - The node type being searched for (eg.
Checks if the AST has the specified node type @param { Object } ast - The Abstract Syntax Tree object created by the parseCode method @param { string } nodeType - The node type being searched for ( eg .