function isVarOnTop(node,statements){var l=statements.length;var i=0;// skip over directives
for(;i<l;++i){if(!looksLikeDirective(statements[i])&&!looksLikeImport(statements[i])){break;}}for(;i<l;++i){if(!isVariableDeclaration(statements[i])){return false;}if(statements[i]===node){return true;}}return false;}
Checks whether this variable is on top of the block body
@param {ASTNode} node - The node to check
@param {ASTNode[]} statements - collection of ASTNodes for the parent node block
@returns {boolean} True if var is on top otherwise false