csv-parser
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -19,2 +19,3 @@ const { Transform } = require('stream') | ||
skipLines: null, | ||
maxRowBytes: Number.MAX_SAFE_INTEGER, | ||
strict: false | ||
@@ -56,2 +57,3 @@ } | ||
this._Row = null | ||
this._currentRowBytes = 0 | ||
this._line = 0 | ||
@@ -219,2 +221,7 @@ | ||
this._currentRowBytes++ | ||
if (this._currentRowBytes > this.maxRowBytes) { | ||
return cb(new Error('Row exceeds the maximum size')) | ||
} | ||
if (!this._escaped && chr === this.escape && nextChr === this.quote && i !== start) { | ||
@@ -247,2 +254,3 @@ this._escaped = true | ||
this._prevEnd = i + 1 | ||
this._currentRowBytes = 0 | ||
} | ||
@@ -249,0 +257,0 @@ } |
{ | ||
"name": "csv-parser", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Streaming CSV parser that aims for maximum speed as well as compatibility with the csv-spectrum test suite", | ||
@@ -35,2 +35,3 @@ "license": "MIT", | ||
"buffer-from": "^1.0.0", | ||
"execa": "^1.0.0", | ||
"generate-function": "^1.0.1", | ||
@@ -37,0 +38,0 @@ "generate-object-property": "^1.0.0", |
@@ -220,2 +220,9 @@ [tests]: http://img.shields.io/travis/mafintosh/csv-parser.svg | ||
##### maxRowBytes | ||
Type: `Number`<br> | ||
Default: `Number.MAX_SAFE_INTEGER` | ||
Maximum number of bytes per row. An error is thrown if a line exeeds this value. The default value is on 8 peta byte. | ||
##### strict | ||
@@ -228,8 +235,2 @@ | ||
##### skipLines | ||
Type: `Integer`<br> | ||
If provided a line number (integer), skips this number of lines before setting a header. | ||
## Events | ||
@@ -236,0 +237,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19919
223
304
7
+ Addedexeca@^1.0.0
+ Addedcross-spawn@6.0.5(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedexeca@1.0.0(transitive)
+ Addedget-stream@4.1.0(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addednice-try@1.0.5(transitive)
+ Addednpm-run-path@2.0.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedp-finally@1.0.0(transitive)
+ Addedpath-key@2.0.1(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedshebang-command@1.2.0(transitive)
+ Addedshebang-regex@1.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedstrip-eof@1.0.0(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwrappy@1.0.2(transitive)