(node: Node)
| 47 | |
| 48 | /** A React component, by the convention that names one: a PascalCase function in a JS-family file. */ |
| 49 | export function looksLikeComponent(node: Node): boolean { |
| 50 | if (node.kind === 'component') return true; |
| 51 | if (node.kind !== 'function') return false; |
| 52 | return JS_FAMILY.has(node.language) && /^[A-Z]/.test(node.name); |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Route id → the layouts it renders inside, outermost first: an Angular |
no test coverage detected