(value, limit = 220)
| 25 | } |
| 26 | |
| 27 | function shortText(value, limit = 220) { |
| 28 | const clean = String(value || '').replace(/\s+/g, ' ').trim(); |
| 29 | if (!clean) { |
| 30 | return ''; |
| 31 | } |
| 32 | return clean.length > limit ? clean.slice(0, limit - 3) + '...' : clean; |
| 33 | } |
| 34 | |
| 35 | function shortMultiline(value, limit = 440) { |
| 36 | const clean = String(value || '').trim(); |
no outgoing calls
no test coverage detected