How to use the isBlock function from babel-types
Find comprehensive JavaScript babel-types.isBlock code examples handpicked from public code repositorys.
86 87 88 89 90 91 92 93 94 95
if (Array.isArray(node)) { return node.some(ancestor => hasBinding(ancestor, name)); } else if ( babelTypes.isProgram(node) || babelTypes.isBlockStatement(node) || babelTypes.isBlock(node) ) { return node.body.some(statement => hasBinding(statement, name)); } else if ( babelTypes.isFunctionDeclaration(node) ||
+ 3 other calls in file
GitHub: mrcoles/parcel

92 93 94 95 96 97 98 99 100 101
if (Array.isArray(node)) { return node.some(ancestor => hasBinding(ancestor, name)); } else if ( types.isProgram(node) || types.isBlockStatement(node) || types.isBlock(node) ) { return node.body.some(statement => hasBinding(statement, name)); } else if ( types.isFunctionDeclaration(node) ||
babel-types.identifier is the most popular function in babel-types (4076 examples)