(str)
| 21 | } |
| 22 | |
| 23 | function visualLength(str) { |
| 24 | let len = 0; |
| 25 | for (const ch of str) len += visualWidth(ch); |
| 26 | return len; |
| 27 | } |
| 28 | |
| 29 | function fitAnsi(str, width, { align = 'left', ellipsis = false, pad = true } = {}) { |
| 30 | if (width <= 0) return ''; |
no test coverage detected