(buffer: string, chunk: string)
| 446 | } |
| 447 | |
| 448 | function drainLines(buffer: string, chunk: string): string { |
| 449 | const combined = buffer + chunk; |
| 450 | const lines = combined.split(/\r?\n/u); |
| 451 | const remainder = lines.pop() ?? ''; |
| 452 | for (const line of lines) { |
| 453 | processLine(line); |
| 454 | } |
| 455 | return remainder; |
| 456 | } |
| 457 | |
| 458 | return { |
| 459 | onStdout(chunk: string): void { |
no test coverage detected