-
Notifications
You must be signed in to change notification settings - Fork 623
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
Addition of CSV #432
Conversation
encoding/csv/test.ts
Outdated
@@ -0,0 +1,2 @@ | |||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. | |||
import "./mod_test.ts"; |
There was a problem hiding this comment.
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
?
encoding/csv/mod.ts
Outdated
@@ -0,0 +1,139 @@ | |||
import { BufReader, BufState } from "../../io/bufio.ts"; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will surely do.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! LGTM
Currently work in progress.
Ported tests from golang
EDIT:
Remaining quotes and CRLF tests to fix and we're done.