(n: number)
| 237 | * This erases each line and moves up, ending at column 1 |
| 238 | */ |
| 239 | export function eraseLines(n: number): string { |
| 240 | if (n <= 0) return '' |
| 241 | let result = '' |
| 242 | for (let i = 0; i < n; i++) { |
| 243 | result += ERASE_LINE |
| 244 | if (i < n - 1) { |
| 245 | result += cursorUp(1) |
| 246 | } |
| 247 | } |
| 248 | result += CURSOR_LEFT |
| 249 | return result |
| 250 | } |
| 251 | |
| 252 | // Scroll |
| 253 |
no test coverage detected