(attribute)
| 26 | * @returns {attribute is AST.Attribute & { value: [AST.Text] }} |
| 27 | */ |
| 28 | export function is_text_attribute(attribute) { |
| 29 | return ( |
| 30 | Array.isArray(attribute.value) && |
| 31 | attribute.value.length === 1 && |
| 32 | attribute.value[0].type === 'Text' |
| 33 | ); |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * Returns true if the attribute contains a single expression node. |
no outgoing calls
no test coverage detected