* Build the target class string from an update descriptor.
(update: ClassNameUpdate)
| 275 | * Build the target class string from an update descriptor. |
| 276 | */ |
| 277 | function buildClass(update: ClassNameUpdate): string { |
| 278 | if (update.standalone) { |
| 279 | return update.tailwindToken ?? `${update.tailwindPrefix}-[${update.value}]`; |
| 280 | } |
| 281 | return update.tailwindToken |
| 282 | ? `${update.tailwindPrefix}-${update.tailwindToken}` |
| 283 | : `${update.tailwindPrefix}-[${update.value}]`; |
| 284 | } |
| 285 | |
| 286 | /** |
| 287 | * Check whether a class string matches a given Tailwind prefix. |
no outgoing calls
no test coverage detected