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
@@ -51,6 +82,166 @@ export type ColumnOption<K = string> =
51
82
|false
52
83
|{name: K};
53
84
85
+
exportinterfaceOptionsNormalized<T=string[]>{
86
+
auto_parse?: boolean|CastingFunction;
87
+
auto_parse_date?: boolean|CastingDateFunction;
88
+
/**
89
+
* If true, detect and exclude the byte order mark (BOM) from the CSV input if present.
90
+
*/
91
+
bom?: boolean;
92
+
/**
93
+
* If true, the parser will attempt to convert input string to native types.
94
+
* If a function, receive the value as first argument, a context as second argument and return a new value. More information about the context properties is available below.
95
+
*/
96
+
cast?: boolean|CastingFunction;
97
+
/**
98
+
* If true, the parser will attempt to convert input string to dates.
99
+
* If a function, receive the value as argument and return a new value. It requires the "auto_parse" option. Be careful, it relies on Date.parse.
* Convert values into an array of values when columns are activated and
123
+
* when multiple columns of the same name are found.
124
+
*/
125
+
group_columns_by_name: boolean;
126
+
/**
127
+
* Treat all the characters after this one as a comment, default to '' (disabled).
128
+
*/
129
+
comment: string|null;
130
+
/**
131
+
* Restrict the definition of comments to a full line. Comment characters
132
+
* defined in the middle of the line are not interpreted as such. The
133
+
* option require the activation of comments.
134
+
*/
135
+
comment_no_infix: boolean;
136
+
/**
137
+
* Set the field delimiter. One character only, defaults to comma.
138
+
*/
139
+
delimiter: Buffer[];
140
+
/**
141
+
* Set the source and destination encoding, a value of `null` returns buffer instead of strings.
142
+
*/
143
+
encoding: BufferEncoding|null;
144
+
/**
145
+
* Set the escape character, one character only, defaults to double quotes.
146
+
*/
147
+
escape: null|Buffer;
148
+
/**
149
+
* Start handling records from the requested number of records.
150
+
*/
151
+
from: number;
152
+
/**
153
+
* Start handling records from the requested line number.
154
+
*/
155
+
from_line: number;
156
+
/**
157
+
* Don't interpret delimiters as such in the last field according to the number of fields calculated from the number of columns, the option require the presence of the `column` option when `true`.
158
+
*/
159
+
ignore_last_delimiters: boolean|number;
160
+
/**
161
+
* Generate two properties `info` and `record` where `info` is a snapshot of the info object at the time the record was created and `record` is the parsed array or object.
162
+
*/
163
+
info: boolean;
164
+
/**
165
+
* If true, ignore whitespace immediately following the delimiter (i.e. left-trim all fields), defaults to false.
166
+
* Does not remove whitespace in a quoted field.
167
+
*/
168
+
ltrim: boolean;
169
+
/**
170
+
* Maximum numer of characters to be contained in the field and line buffers before an exception is raised,
171
+
* used to guard against a wrong delimiter or record_delimiter,
172
+
* default to 128000 characters.
173
+
*/
174
+
max_record_size: number;
175
+
/**
176
+
* Name of header-record title to name objects by.
177
+
*/
178
+
objname: number|string|undefined;
179
+
/**
180
+
* Alter and filter records by executing a user defined function.
* Set the source and destination encoding, a value of `null` returns buffer instead of strings.
125
316
*/
126
-
encoding?: BufferEncoding|undefined;
317
+
encoding?: BufferEncoding|boolean|null|undefined;
127
318
/**
128
319
* Set the escape character, one character only, defaults to double quotes.
129
320
*/
130
-
escape?: string|null|false|Buffer;
321
+
escape?: string|null|boolean|Buffer;
131
322
/**
132
323
* Start handling records from the requested number of records.
133
324
*/
134
-
from?: number;
325
+
from?: number|string;
135
326
/**
136
327
* Start handling records from the requested line number.
137
328
*/
138
-
from_line?: number;
139
-
fromLine?: number;
329
+
from_line?: null|number|string;
330
+
fromLine?: null|number|string;
140
331
/**
141
332
* Don't interpret delimiters as such in the last field according to the number of fields calculated from the number of columns, the option require the presence of the `column` option when `true`.
0 commit comments