(chunks: string[])
| 478 | |
| 479 | /** This is an internal helper function that's just used for testing */ |
| 480 | export function _decodeChunks(chunks: string[]): string[] { |
| 481 | const decoder = new LineDecoder(); |
| 482 | const lines: string[] = []; |
| 483 | for (const chunk of chunks) { |
| 484 | lines.push(...decoder.decode(chunk)); |
| 485 | } |
| 486 | |
| 487 | return lines; |
| 488 | } |
| 489 | |
| 490 | function partition(str: string, delimiter: string): [string, string, string] { |
| 491 | const index = str.indexOf(delimiter); |