adaltas / adaltas/node-csv

Assign row number to each record

Open
#328 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
4.3k
Forks
299
Avg merge
16h 19m
Merged PRs (30d)
1

Description

Summary

The idea is to opt into adding a row number and having that value assigned to a configured property.

Motivation

It's handy for me because it allows my user interface to tell the user where that data has come from better.

Alternative

I have considered adding a row number to my CSV raw data before putting it in csv-parse.

Draft

parse({
  row: true, // will result in a row property added to each record
  row: 'some_other_field' // will assign the row number to that field.
})

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

Start by reading the csv-parse option handling and existing parser tests to determine how an opt-in row number could be exposed and assigned to each record. Compare the proposed row: true and row: 'some_other_field' forms, then define tests showing the configured property and numbering behavior before considering the feature complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.