()
| 102 | let consumed = false; |
| 103 | |
| 104 | async function* iterLines(): AsyncGenerator<string, void, unknown> { |
| 105 | const lineDecoder = new LineDecoder(); |
| 106 | |
| 107 | const iter = readableStreamAsyncIterable<Bytes>(readableStream); |
| 108 | for await (const chunk of iter) { |
| 109 | for (const line of lineDecoder.decode(chunk)) { |
| 110 | yield line; |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | for (const line of lineDecoder.flush()) { |
| 115 | yield line; |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | async function* iterator(): AsyncIterator<Item, any, undefined> { |
| 120 | if (consumed) { |
nothing calls this directly
no test coverage detected