Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of CSV #432

Merged
merged 3 commits into from
May 24, 2019
Merged

Addition of CSV #432

merged 3 commits into from
May 24, 2019

Conversation

zekth
Copy link
Contributor

@zekth zekth commented May 22, 2019

Currently work in progress.
Ported tests from golang

EDIT:
Remaining quotes and CRLF tests to fix and we're done.

@@ -0,0 +1,2 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import "./mod_test.ts";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not encoding/csv_test.ts ?

@@ -0,0 +1,139 @@
import { BufReader, BufState } from "../../io/bufio.ts";
Copy link
Member

@ry ry May 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename file to encoding/csv.ts

Please add

// Ported from Go:
// https://github.com/golang/go/blob/go1.12.5/src/encoding/csv/
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will surely do.

@zekth zekth mentioned this pull request May 23, 2019
@zekth
Copy link
Contributor Author

zekth commented May 24, 2019

Remains weird cases with double quotes and multiline in fields to handle. For me it's landable now and tests are already here. So if you want to land it now i'm OK. There is a TODO comment added for remaining cases

encoding/csv.ts Outdated Show resolved Hide resolved
encoding/csv.ts Outdated Show resolved Hide resolved
@zekth zekth changed the title [WIP] Addition of CSV Addition of CSV May 24, 2019
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! LGTM

@ry ry merged commit c8a7dcd into denoland:master May 24, 2019
@zekth zekth deleted the csv branch May 24, 2019 13:35
ry pushed a commit to ry/deno that referenced this pull request Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants