denoland / denoland/std

suggestion: investigate simpler CSV-parsing APIs

Open
#3,765 1 comment 4 reactions 0 assignees View on GitHub
help wanted
Dominant language
TypeScript
Stars
3.6k
Forks
681
PR merge metrics
No merged PRs in 30d

Description

[`CsvParseStream()`](https://deno.land/std@0.205.0/csv/mod.ts?s=CsvParseStream) and [`parse()`](https://deno.land/std@0.205.0/csv/mod.ts?s=parse) in `std/csv` appear to be more complicated than needed. I think we could do the following:
- [ ] Create a `parseLine(line: string): string[]` which `CsvParseStream()` and `parse()` can use to parse each line.
- [ ] Require the piping of [`TextLineStream()`](https://deno.land/std@0.205.0/streams/mod.ts?s=TextLineStream) in the stream before `CsvParseStream()` so the duplicated logic can be offloaded.

I could be wrong with these, but it's worth the discussion. Other ideas to simplify these APIs are also welcome.

Related #2291

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.