I want to read a csv file rows one by one and perform a third party call on them. but when i pause the stream it is getting resume before my response.
const csv = require('csv-parser');
const readStream = fs.createReadStream('data.csv');
readStream
.pipe(csv())
.on('data', async (row) => {
readStream.pause();
await processSomeThirdPartyCalls(row);
readStream.resume();
})
Let me know if I need to clarify more