(text: string, maxLength = 45)
| 873 | } |
| 874 | |
| 875 | export function applyEllipsis(text: string, maxLength = 45) { |
| 876 | if (typeof text !== 'string') { |
| 877 | return '' |
| 878 | } |
| 879 | if (!Number.isInteger(maxLength) || maxLength <= 0) { |
| 880 | return text |
| 881 | } |
| 882 | if (text.length <= maxLength) { |
| 883 | return text |
| 884 | } |
| 885 | return text.slice(0, maxLength) + '...' |
| 886 | } |
| 887 | |
| 888 | /** |
| 889 | * Constants shared among chart components using seeded patterns with the <VueUiPatternSeed> component. |
no outgoing calls
no test coverage detected