(source: AsyncGenerator<Buffer | string>)
| 13 | } |
| 14 | |
| 15 | export async function* pipeEachLine(source: AsyncGenerator<Buffer | string>): AsyncGenerator<Buffer | string> { |
| 16 | for await (const chunk of source) { |
| 17 | for (const line of eachLine(chunk)) { |
| 18 | yield line; |
| 19 | } |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Reads the input of source and calls `fn` for each line as a side-effect. |
no test coverage detected