(node: Node | VirtualElement)
| 327 | }; |
| 328 | |
| 329 | export const isChildComponent = (node: Node | VirtualElement): boolean => { |
| 330 | const type = node.nodeType; |
| 331 | if (type === 3 || type === 111) { |
| 332 | return true; |
| 333 | } |
| 334 | if (type !== 1) { |
| 335 | return false; |
| 336 | } |
| 337 | const nodeName = node.nodeName; |
| 338 | if (nodeName === 'Q:TEMPLATE') { |
| 339 | return false; |
| 340 | } |
| 341 | if (nodeName === 'HEAD') { |
| 342 | return (node as Element).hasAttribute('q:head'); |
| 343 | } |
| 344 | if (nodeName === 'STYLE') { |
| 345 | return !(node as Element).hasAttribute(QStyle); |
| 346 | } |
| 347 | return true; |
| 348 | }; |
| 349 | |
| 350 | export const splitChildren = (input: ProcessedJSXNode[]): Record<string, ProcessedJSXNode> => { |
| 351 | const output: Record<string, ProcessedJSXNode> = {}; |
nothing calls this directly
no test coverage detected
searching dependent graphs…