You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`newlineChar` (`\r\n`): What `newline` character(s) to be used.
71
-
-`delimiterChar` (`,`): Characters used to separate fields. Must be length of 1
72
-
-`quoteChar` (`"`): Character used to wrap fields that need to have special characters within them. Must be length of 1
73
-
-`escapeChar` (`${quoteChar}`): Character used to escape the `quoteChar`. Must be length of 1
74
-
75
69
### Parse
76
70
-`header` (`true`): Keys to be used in JSON object for the parsed row
77
71
-`true`: First row of the `input` is the headers and will need to be pulled out
78
72
-`[...]`: Pre-assign headers because `input` contains no headers.
79
73
-`false`: Don't map to JSON, return array of values instead.
74
+
-`newlineChar` (`''`): What `newline` character(s) to be used. By default will guess from `\r\n`, `\n`, `\r`
75
+
-`delimiterChar` (`''`): Characters used to separate fields. Must be length of 1. By default will guess from `,`, `\t`, `|`, `;`, `\x1E`, `\x1F`
76
+
-`quoteChar` (`"`): Character used to wrap fields that need to have special characters within them. Must be length of 1
77
+
-`escapeChar` (`${quoteChar}`): Character used to escape the `quoteChar`. Must be length of 1
80
78
-`enqueue` (`({data, idx, err}) => {}`): Function to run on parsed row data.
81
-
-`emptyFieldValue` (``): Value to be used instead of an empty string. Can be set to `undefined` to have empty fields not be included.
82
-
-`coerceField` (`(field) => field`): Function to apply type/value coercion.
83
-
-`commentPrefixValue` (false): Lines starting with this value will be ignored (i.e. `#`, `//`). Can be set to `false` if files will never have comments.
79
+
-`emptyFieldValue` (`''`): Value to be used instead of an empty string. Can be set to `undefined` to have empty fields not be included.
80
+
-`coerceField` (`(field, idx) => field`): Function to apply type/value coercion.
81
+
-`commentPrefixValue` (`false`): Lines starting with this value will be ignored (i.e. `#`, `//`). Can be set to `false` if files will never have comments.
84
82
-`errorOnEmptyLine` (`true`): When an empty line is encountered. Push row with error when occurs, row ignored otherwise.
85
83
-`errorOnComment` (`true`): When a comment is encountered. Push row with error when occurs, row ignored otherwise.
86
84
-`errorOnFieldsMismatch` (`true`): When number of headers does not match the number of fields in a row. Push row with error when occurs, row ignored otherwise.
0 commit comments