diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2019-07-08 04:20:41 +0900 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-07-07 15:20:41 -0400 |
commit | 9a01d6455ec3cfa955967102f576cb542999321a (patch) | |
tree | 82a4ab5776a09432f23b9ed99a31306c884c833e /encoding/csv.ts | |
parent | 6a0858bd5d9d327ac7f46bee5f5b2fab642f2a3f (diff) |
Upgrade to v0.11.0 (update Reader interface) (denoland/deno_std#527)
Original: https://github.com/denoland/deno_std/commit/3ea90d54f6dad4bcc3d32e63601096a6c0ff3ce4
Diffstat (limited to 'encoding/csv.ts')
-rw-r--r-- | encoding/csv.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/encoding/csv.ts b/encoding/csv.ts index ccbf4df77..afd011f51 100644 --- a/encoding/csv.ts +++ b/encoding/csv.ts @@ -2,7 +2,7 @@ // https://github.com/golang/go/blob/go1.12.5/src/encoding/csv/ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -import { BufReader, EOF } from "../io/bufio.ts"; +import { BufReader } from "../io/bufio.ts"; import { TextProtoReader } from "../textproto/mod.ts"; import { StringReader } from "../io/readers.ts"; @@ -52,14 +52,14 @@ async function read( Startline: number, reader: BufReader, opt: ParseOptions = { comma: ",", trimLeadingSpace: false } -): Promise<string[] | EOF> { +): Promise<string[] | Deno.EOF> { const tp = new TextProtoReader(reader); let line: string; let result: string[] = []; let lineIndex = Startline; const r = await tp.readLine(); - if (r === EOF) return EOF; + if (r === Deno.EOF) return Deno.EOF; line = r; // Normalize \r\n to \n on all input lines. if ( @@ -126,7 +126,7 @@ export async function readAll( for (;;) { const r = await read(lineIndex, reader, opt); - if (r === EOF) break; + if (r === Deno.EOF) break; lineResult = r; lineIndex++; // If fieldsPerRecord is 0, Read sets it to |