Describe the bug
When I try setting to_line or to to a value that is NOT the end of the file, node throws a ERR_STREAM_PREMATURE_CLOSE at me.
To Reproduce
const csvPath = 'myFilewithMoreThanTwoRows.csv';
const parser = fs.createReadStream(csvPath).pipe(
parse({
to_line: 2,
}),
);
for await (const record of parser) {
process.stdout.write(`${record.join(',')}\n`);
}
Additional context
This seems like it might be related to the changes made for #333.
In this example, if the CSV only has 2 rows then there's no issue.
Describe the bug
When I try setting
to_lineortoto a value that is NOT the end of the file, node throws aERR_STREAM_PREMATURE_CLOSEat me.To Reproduce
Additional context
This seems like it might be related to the changes made for #333.
In this example, if the CSV only has 2 rows then there's no issue.