Skip to content

Commit af30fbe

Browse files
committed
add off option to quote number
1 parent f5f4bf1 commit af30fbe

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

libs/core/utils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ function rowSplit(rowStr, param) {
5050
}
5151
var delimiter=param.delimiter;
5252
var rowArr = rowStr.split(delimiter);
53+
if (quote ==="off"){
54+
return rowArr;
55+
}
5356
var row = [];
5457
var inquote = false;
5558
var quoteBuff = '';

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"email": "t3dodson@gmail.com"
1919
}
2020
],
21-
"version": "0.5.11",
21+
"version": "0.5.12",
2222
"keywords": [
2323
"csv",
2424
"csvtojson",

readme.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[![Build Status](https://travis-ci.org/Keyang/node-csvtojson.svg?branch=master)](https://travis-ci.org/Keyang/node-csvtojson)
2+
23
# CSVTOJSON
34
All you need nodejs csv to json converter.
45
* Large CSV data
@@ -144,7 +145,7 @@ Following parameters are supported:
144145

145146
* **constructResult**: true/false. Whether to construct final json object in memory which will be populated in "end_parsed" event. Set to false if deal with huge csv data. default: true.
146147
* **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: ","
147-
* **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. default: " (double quote)
148+
* **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)
148149
* **trim**: Indicate if parser trim off spaces surrounding column content. e.g. " content " will be trimmed to "content". Default: true
149150
* **checkType**: This parameter turns on and off weather check field type. default is true. See [Field type](#field-type)
150151
* **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.
@@ -724,6 +725,10 @@ The parameter of Parse function is a JSON object. It contains following fields:
724725

725726
#Change Log
726727

728+
## 0.5.12
729+
* Added support for scientific notation number support (#100)
730+
* Added "off" option to quote parameter
731+
727732
## 0.5.4
728733
* Added new feature: accept special delimiter "auto" and array
729734

0 commit comments

Comments
 (0)