(text: string, textTransform: CoreTypes.TextTransformType)
| 575 | } |
| 576 | |
| 577 | export function getTransformedText(text: string, textTransform: CoreTypes.TextTransformType): string { |
| 578 | if (!text || !isString(text)) { |
| 579 | return ''; |
| 580 | } |
| 581 | |
| 582 | switch (textTransform) { |
| 583 | case 'uppercase': |
| 584 | return text.toUpperCase(); |
| 585 | case 'lowercase': |
| 586 | return text.toLowerCase(); |
| 587 | case 'capitalize': |
| 588 | return getCapitalizedString(text); |
| 589 | case 'none': |
| 590 | default: |
| 591 | return text; |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | function isStringTappable(formattedString: FormattedString) { |
| 596 | if (!formattedString) { |
no test coverage detected