(node)
| 6 | * @param {AST.SvelteNode} node |
| 7 | */ |
| 8 | export function determine_slot(node) { |
| 9 | if (!is_element_node(node)) return null; |
| 10 | |
| 11 | for (const attribute of node.attributes) { |
| 12 | if (attribute.type !== 'Attribute') continue; |
| 13 | if (attribute.name !== 'slot') continue; |
| 14 | if (!is_text_attribute(attribute)) continue; |
| 15 | |
| 16 | return /** @type {string} */ (attribute.value[0].data); |
| 17 | } |
| 18 | |
| 19 | return null; |
| 20 | } |
no test coverage detected