max-mapper / max-mapper/binary-csv

data event emits line *and* index of that line

Open
#8 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
106
Forks
15
PR merge metrics
No merged PRs in 30d

Description

At the moment AFAICT (!) I can't get the index of the current line. I'd love something like:

.on('data', function(line, index) {... }

This is useful in a whole bunch of situations. Would it be possible to add - e.g. i'm implementing a head operator for a csv in https://github.com/okfn/datapipes

Contributor guide

No contributing guide indexed for this repository

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

Start by tracing the parser's .on('data', function(line, index) {...}) event interface and how data events are emitted. Check the datapipes head-operator use case, then verify that each emitted line includes its index and that existing streaming behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.