(stream, options)
| 1371 | }; |
| 1372 | |
| 1373 | function streamToAsyncIterator(stream, options) { |
| 1374 | if (typeof stream.read !== 'function') { |
| 1375 | stream = Readable.wrap(stream, { objectMode: true }); |
| 1376 | } |
| 1377 | |
| 1378 | const iter = createAsyncIterator(stream, options); |
| 1379 | iter.stream = stream; |
| 1380 | return iter; |
| 1381 | } |
| 1382 | |
| 1383 | async function* createAsyncIterator(stream, options) { |
| 1384 | let callback = nop; |
no test coverage detected
searching dependent graphs…