util: comment opt for getInputList

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-06-09 14:11:57 +02:00
parent 6fc5565c73
commit 9450a454a7
2 changed files with 14 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ import {parse} from 'csv-parse/sync';
export interface InputListOpts {
ignoreComma?: boolean;
comment?: string;
quote?: string | boolean | Buffer | null;
}
@@ -36,7 +37,7 @@ export class Util {
const records = parse(items, {
columns: false,
relaxQuotes: true,
comment: '#',
comment: opts?.comment,
relaxColumnCount: true,
skipEmptyLines: true,
quote: opts?.quote