mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 05:04:48 +00:00
Use dprint for internal formatting (#6682)
This commit is contained in:
parent
9eca71caa1
commit
cde4dbb351
378 changed files with 3116 additions and 3121 deletions
|
@ -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++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue