How to use the isArrayExpression function from babel-types
Find comprehensive JavaScript babel-types.isArrayExpression code examples handpicked from public code repositorys.
GitHub: MorningBells/taro
127 128 129 130 131 132 133 134 135 136
ObjectProperty (astPath) { const node = astPath.node const key = node.key const value = node.value // if (key.name !== 'pages' || !t.isArrayExpression(value)) return if (key.name === 'pages' && t.isArrayExpression(value)) { value.elements.forEach(v => { pages.push(v.value) }) } else if (key.name === 'tabBar' && t.isObjectExpression(value)) {
0
2
2
+ 13 other calls in file
GitHub: zwq194/ice
66 67 68 69 70 71 72 73 74 75
layoutImported = false; }, VariableDeclarator({ node }) { if ( t.isIdentifier(node.id, { name: ROUTER_CONFIG }) && t.isArrayExpression(node.init) ) { // 针对 ROUTER_CONFIG 变量做 处理 let pageIndex = -1; const hasPage = node.init.elements.some((oe, index) => {
0
2
2
GitHub: astrocean/taro-cli-2.0.6
432 433 434 435 436 437 438 439 440 441
switch (astConvert_1.convertAstExpressionToVariable(node.key)) { case 'position': tabbarPos = astConvert_1.convertAstExpressionToVariable(node.value); break; case 'list': t.isArrayExpression(node.value) && node.value.elements.forEach(v => { if (!t.isObjectExpression(v)) return; v.properties.forEach(property => { if (!t.isObjectProperty(property))
0
0
0
+ 23 other calls in file
babel-types.identifier is the most popular function in babel-types (4076 examples)