mafintosh / mafintosh/csv-parser

Using async function to make await call

Open
#226 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.5k
Forks
143
PR merge metrics
No merged PRs in 30d

Description

### Feature Proposal

Using async function to make await call.

### Feature Use Case

```
const fs = require('fs');
const csv = require('csv-parser');

fs.createReadStream('file.csv')
.pipe(csv())
.on('data', async (data) => {
await myAsyncFunction(data);
})
.on('end', async () => {
await myAsyncFunctionEndOfRead();
});
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue provides only an example using fs.createReadStream, csv(), and async data and end handlers; it names no repository file or test. First clarify the expected behavior for awaiting those handlers, then identify the relevant entry point and define completion with a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.