Merge pull request #115 from crazy-max/input-comment-opt
Some checks failed
publish / publish (push) Has been cancelled

util: comment opt for getInputList
This commit is contained in:
CrazyMax
2023-06-13 10:31:11 +02:00
committed by GitHub
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