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
Copy file name to clipboardExpand all lines: libs/core/defParam.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ module.exports=function(params){
4
4
delimiter: ',',// change the delimiter of csv columns. It is able to use an array to specify potencial delimiters. e.g. [",","|",";"]
5
5
quote: '"',//quote for a column containing delimiter.
6
6
trim: true,//trim column's space charcters
7
-
checkType: true,//whether check column type
7
+
checkType: false,//whether check column type
8
8
toArrayString: false,//stream down stringified json array instead of string of json. (useful if downstream is file writer etc)
9
9
ignoreEmpty: false,//Ignore empty value while parsing. if a value of the column is empty, it will be skipped parsing.
10
10
workerNum: getEnv("CSV_WORKER",1),//number of parallel workers. If multi-core CPU available, increase the number will get better performance for large csv data.
Copy file name to clipboardExpand all lines: readme.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -238,7 +238,7 @@ Following parameters are supported:
238
238
***delimiter**: delimiter used for seperating columns. Use "auto" if delimiter is unknown in advance, in this case, delimiter will be auto-detected (by best attempt). Use an array to give a list of potential delimiters e.g. [",","|","$"]. default: ","
239
239
***quote**: If a column contains delimiter, it is able to use quote character to surround the column content. e.g. "hello, world" wont be split into two columns while parsing. Set to "off" will ignore all quotes. default: " (double quote)
240
240
***trim**: Indicate if parser trim off spaces surrounding column content. e.g. " content " will be trimmed to "content". Default: true
241
-
***checkType**: This parameter turns on and off whether check field type. default is true.
241
+
***checkType**: This parameter turns on and off whether check field type. default is false.
242
242
***toArrayString**: Stringify the stream output to JSON array. This is useful when pipe output to a file which expects stringified JSON array. default is false and only stringified JSON (without []) will be pushed to downstream.
243
243
***ignoreEmpty**: Ignore the empty value in CSV columns. If a column value is not giving, set this to true to skip them. Defalut: false.
244
244
***workerNum**: Number of worker processes. The worker process will use multi-cores to help process CSV data. Set to number of Core to improve the performance of processing large csv file. Keep 1 for small csv files. Default 1.
@@ -283,7 +283,7 @@ csv()
283
283
})
284
284
```
285
285
286
-
`csvRow` is always an array of strings no matter `checkType` value.
286
+
`csvRow` is always an array of strings without types.
287
287
288
288
`csv` event is the fastest parse event while `json` and `data` event is about 2 times slower. Thus if `csv` is enough, for best performance, just use it without `json` and `data` event.
289
289
@@ -549,6 +549,12 @@ There are some limitations when using multi-core feature:
549
549
550
550
#Change Log
551
551
552
+
553
+
## 1.1.4
554
+
555
+
* default value of `checkType` is now false as it causes problems on some csv docs.
556
+
* Added ignoreColumns and includeColumns features. #138
0 commit comments