From 9a01d6455ec3cfa955967102f576cb542999321a Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Mon, 8 Jul 2019 04:20:41 +0900 Subject: Upgrade to v0.11.0 (update Reader interface) (denoland/deno_std#527) Original: https://github.com/denoland/deno_std/commit/3ea90d54f6dad4bcc3d32e63601096a6c0ff3ce4 --- encoding/csv.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'encoding') 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 { +): Promise { 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 -- cgit v1.2.3