(text, maxLength = 100)
| 94 | } |
| 95 | |
| 96 | function truncateText(text, maxLength = 100) { |
| 97 | if (!text) return ''; |
| 98 | if (text.length <= maxLength) return text; |
| 99 | return text.substring(0, maxLength) + '...'; |
| 100 | } |
| 101 | |
| 102 | function formatFileSize(bytes) { |
| 103 | if (bytes === 0) return '0 B'; |
no outgoing calls
no test coverage detected