(
filePath: string,
keyword: string,
classnameTransformer: StringTransformer,
)
| 421 | * Get all classnames from the file contents |
| 422 | */ |
| 423 | export async function getAllClassNames( |
| 424 | filePath: string, |
| 425 | keyword: string, |
| 426 | classnameTransformer: StringTransformer, |
| 427 | ): Promise<string[]> { |
| 428 | const classes = await filePathToClassnameDict( |
| 429 | filePath, |
| 430 | classnameTransformer, |
| 431 | ); |
| 432 | const classList = Object.keys(classes).map(x => x.slice(1)); |
| 433 | |
| 434 | return keyword !== '' |
| 435 | ? classList.filter(item => item.includes(keyword)) |
| 436 | : classList; |
| 437 | } |
| 438 | |
| 439 | export function stringifyClassname( |
| 440 | classname: string, |
no test coverage detected