(text: string, limit: number)
| 12 | } |
| 13 | |
| 14 | export function truncate(text: string, limit: number): string { |
| 15 | if (text.length > limit) { |
| 16 | return `${text.substring(0, limit)}...`; |
| 17 | } |
| 18 | return text; |
| 19 | } |
| 20 | |
| 21 | export function random(): string { |
| 22 | return (Math.random() * 100000000000).toString(); |
no outgoing calls
no test coverage detected