Use dprint for internal formatting (#6682)

This commit is contained in:
David Sherret 2020-07-14 15:24:17 -04:00 committed by GitHub
parent 9eca71caa1
commit cde4dbb351
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
378 changed files with 3116 additions and 3121 deletions

View file

@ -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++;
}