refactor: default csv-parse params

This commit is contained in:
hyper
2026-03-31 14:45:02 +08:00
parent 3a6f57ef6f
commit 9a8cdcaaea
2 changed files with 19 additions and 4 deletions
+6
View File
@@ -38,6 +38,9 @@ module.exports = {
delimiter: ',',
quote: '"',
escape: '\\',
bom: true, // 处理 BOM (默认 true)
comment: '#', // 忽略 # 开头的注释行 (默认 '#')
trim: true, // 修剪表头和值的前后空格 (默认 true)
},
},
},
@@ -64,6 +67,9 @@ import data from './data.schema.csv';
| `delimiter` | string | `,` | Column delimiter |
| `quote` | string | `"` | Quote character |
| `escape` | string | `\` | Escape character |
| `bom` | boolean | `true` | Handle byte order mark |
| `comment` | string \| `false` | `#` | Comment character (set `false` to disable) |
| `trim` | boolean | `true` | Trim headers and values |
## Schema Syntax