Check if AST static classes are a subset of the DOM classes provided.
(astClasses: string[], domClassName: string)
| 194 | |
| 195 | /** Check if AST static classes are a subset of the DOM classes provided. */ |
| 196 | function classNameSubsetMatch(astClasses: string[], domClassName: string): boolean { |
| 197 | if (astClasses.length === 0) return false; |
| 198 | const domClasses = domClassName.split(/\s+/).filter(Boolean); |
| 199 | // All AST classes should appear in DOM classes |
| 200 | return astClasses.every((c) => domClasses.includes(c)); |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * Compute the nth-of-type index (0-based) for a JSX element among its |
nothing calls this directly
no outgoing calls
no test coverage detected