diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2020-07-14 15:24:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 15:24:17 -0400 |
commit | cde4dbb35132848ffece59ef9cfaccff32347124 (patch) | |
tree | cc7830968c6decde704c8cfb83c9185193dc698f /std/encoding/csv.ts | |
parent | 9eca71caa1674c31f9cc5d4e86c03f10b59e0a00 (diff) |
Use dprint for internal formatting (#6682)
Diffstat (limited to 'std/encoding/csv.ts')
-rw-r--r-- | std/encoding/csv.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/std/encoding/csv.ts b/std/encoding/csv.ts index 5af054530..27b40c566 100644 --- a/std/encoding/csv.ts +++ b/std/encoding/csv.ts @@ -63,7 +63,7 @@ function chkOptions(opt: ReadOptions): void { async function readRecord( Startline: number, reader: BufReader, - opt: ReadOptions = { comma: ",", trimLeadingSpace: false } + opt: ReadOptions = { comma: ",", trimLeadingSpace: false }, ): Promise<string[] | null> { const tp = new TextProtoReader(reader); const lineIndex = Startline; @@ -86,7 +86,8 @@ async function readRecord( const commaLen = opt.comma.length; let recordBuffer = ""; const fieldIndexes = [] as number[]; - parseField: for (;;) { + parseField: + for (;;) { if (opt.trimLeadingSpace) { line = line.trimLeft(); } @@ -221,7 +222,7 @@ export async function readMatrix( comma: ",", trimLeadingSpace: false, lazyQuotes: false, - } + }, ): Promise<string[][]> { const result: string[][] = []; let _nbFields: number | undefined; @@ -315,7 +316,7 @@ export async function parse( input: string | BufReader, opt: ParseOptions = { header: false, - } + }, ): Promise<unknown[]> { let r: string[][]; if (input instanceof BufReader) { @@ -336,7 +337,7 @@ export async function parse( return { name: e, }; - } + }, ); } } else { @@ -347,7 +348,7 @@ export async function parse( return { name: e, }; - } + }, ); i++; } |