How to use the isFunctionDeclaration function from babel-types
Find comprehensive JavaScript babel-types.isFunctionDeclaration code examples handpicked from public code repositorys.
90 91 92 93 94 95 96 97 98 99
babelTypes.isBlockStatement(node) || babelTypes.isBlock(node) ) { return node.body.some(statement => hasBinding(statement, name)); } else if ( babelTypes.isFunctionDeclaration(node) || babelTypes.isFunctionExpression(node) || babelTypes.isArrowFunctionExpression(node) ) { return (
+ 5 other calls in file
4 5 6 7 8 9 10 11 12 13
function parseNode(contextNode) { if ( t.isFunctionExpression(contextNode) || t.isArrowFunctionExpression(contextNode) || t.isFunctionDeclaration(contextNode) || t.isObjectMethod(contextNode) ) { return parseFunctionExpression(contextNode); }
+ 7 other calls in file
0 1 2 3 4 5 6 7 8
const t = require('babel-types'); const ANONYMOUS_FUNCTION = 'anonymous function'; const isNodeTypeAFunction = n => t.isFunctionDeclaration(n) || t.isArrowFunctionExpression(n) || t.isClassMethod(n) || t.isFunctionExpression(n);
GitHub: Philmod/parcel
![Philmod profile picture](/Philmod.png?size=40)
98 99 100 101 102 103 104 105 106 107
types.isBlockStatement(node) || types.isBlock(node) ) { return node.body.some(statement => hasBinding(statement, name)); } else if ( types.isFunctionDeclaration(node) || types.isFunctionExpression(node) || types.isArrowFunctionExpression(node) ) { return (
babel-types.identifier is the most popular function in babel-types (4076 examples)