How to use the isArrowFunctionExpression function from babel-types
Find comprehensive JavaScript babel-types.isArrowFunctionExpression code examples handpicked from public code repositorys.
92 93 94 95 96 97 98 99 100 101
) { return node.body.some(statement => hasBinding(statement, name)); } else if ( babelTypes.isFunctionDeclaration(node) || babelTypes.isFunctionExpression(node) || babelTypes.isArrowFunctionExpression(node) ) { return ( (node.id !== null && node.id.name === name) || node.params.some(
0
49
1
+ 5 other calls in file
3 4 5 6 7 8 9 10 11 12
module.exports = parseNode; function parseNode(contextNode) { if ( t.isFunctionExpression(contextNode) || t.isArrowFunctionExpression(contextNode) || t.isFunctionDeclaration(contextNode) || t.isObjectMethod(contextNode) ) { return parseFunctionExpression(contextNode);
3
6
1
+ 7 other calls in file
1 2 3 4 5 6 7 8 9 10
const ANONYMOUS_FUNCTION = 'anonymous function'; const isNodeTypeAFunction = n => t.isFunctionDeclaration(n) || t.isArrowFunctionExpression(n) || t.isClassMethod(n) || t.isFunctionExpression(n); // What to do with declareFunction type?
2
60
3
GitHub: Philmod/parcel
100 101 102 103 104 105 106 107 108 109
) { return node.body.some(statement => hasBinding(statement, name)); } else if ( types.isFunctionDeclaration(node) || types.isFunctionExpression(node) || types.isArrowFunctionExpression(node) ) { return ( (node.id !== null && node.id.name === name) || node.params.some(
0
1
2
babel-types.identifier is the most popular function in babel-types (4076 examples)