How to use the isSequenceExpression function from @babel/types
Find comprehensive JavaScript @babel/types.isSequenceExpression code examples handpicked from public code repositorys.
GitHub: yandex/reselector
47 48 49 50 51 52 53 54 55 56
const { parent } = p if ( t.isCallExpression(parent) || t.isConditionalExpression(parent) || t.isSequenceExpression(parent) || t.isLogicalExpression(parent) ) { return isReturned(p.parentPath) }
10
44
10
+ 17 other calls in file
178 179 180 181 182 183 184 185 186 187
scope.traverse(scope.block, { ReturnStatement: (path_) => { const node_ = path_.node; if ( node_.argument && t.isSequenceExpression(node_.argument) && t.isAssignmentExpression(node_.argument.expressions[0]) && t.isBinaryExpression(node_.argument.expressions[0].right) && node_.argument.expressions[0].right.operator === '-' && !isNaN(node_.argument.expressions[0].right.right.value)
5
15
1
+ 31 other calls in file
85 86 87 88 89 90 91 92 93
// 为了排除这种情况: // (function(n) { // return App(A(n)); // }) var parentNode = match[0].nodePath.parentPath.node return (t.isExpressionStatement(parentNode) || t.isSequenceExpression(parentNode)) } } })
221
0
0
271 272 273 274 275 276 277 278 279 280
left: node })) { return true; } if (hasPostfixPart(node, parent) && !t.isNewExpression(parent) || t.isSequenceExpression(parent) && parent.expressions[0] === node || t.isConditional(parent, { test: node }) || t.isBinary(parent, { left: node }) || t.isAssignmentExpression(parent, {
0
0
0
+ 2 other calls in file
@babel/types.identifier is the most popular function in @babel/types (20936 examples)