* Pad or truncate a string to fit a specific width
(str: string, width: number)
| 74 | * Pad or truncate a string to fit a specific width |
| 75 | */ |
| 76 | function fitString(str: string, width: number): string { |
| 77 | if (str.length > width) { |
| 78 | return str.slice(0, width - 1) + "…"; |
| 79 | } |
| 80 | return str.padEnd(width); |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * Format host and database into a single string |
no outgoing calls
no test coverage detected