(delimiter = ',')
| 21 | * object keyed by the (first-row) headers. |
| 22 | */ |
| 23 | export function csvParseOptions(delimiter = ','): CsvParseOptions { |
| 24 | return { |
| 25 | columns: true, |
| 26 | skip_empty_lines: true, |
| 27 | trim: true, |
| 28 | relax_column_count: true, |
| 29 | relax_quotes: true, |
| 30 | skip_records_with_error: true, |
| 31 | cast: false, |
| 32 | bom: true, |
| 33 | delimiter, |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Returns a streaming `csv-parse` parser (a `Transform`/async-iterable). Pipe a |
no outgoing calls
no test coverage detected