stream: unref
Current WIP unref implementation that was talked about in:
Cc @benjamingr, @ronag WDYT?
This would allow the following code:
const csvParsedStream = fs
.createReadStream('file.csv')
.compose(csvParse({ columns: false }));
const [columns] = await unref(csvParsedStream)
.take(1)
.toArray();
const parsed = await csvParsedStream.map((row) => parseRowByColumns(row, columns)).toArray();