This repository was archived by the owner on Jun 28, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -620,7 +620,8 @@ var Parser = /*#__PURE__*/function (_Transform) {
620
620
escaping : false ,
621
621
// escapeIsQuote: options.escape === options.quote,
622
622
escapeIsQuote : Buffer . isBuffer ( options . escape ) && Buffer . isBuffer ( options . quote ) && Buffer . compare ( options . escape , options . quote ) === 0 ,
623
- expectedRecordLength : options . columns === null ? 0 : options . columns . length ,
623
+ // columns can be `false`, `true`, `Array`
624
+ expectedRecordLength : Array . isArray ( options . columns ) ? options . columns . length : undefined ,
624
625
field : new ResizeableBuffer ( 20 ) ,
625
626
firstLineToHeaders : fnFirstLineToHeaders ,
626
627
info : Object . assign ( { } , this . info ) ,
Original file line number Diff line number Diff line change @@ -620,7 +620,8 @@ var Parser = /*#__PURE__*/function (_Transform) {
620
620
escaping : false ,
621
621
// escapeIsQuote: options.escape === options.quote,
622
622
escapeIsQuote : Buffer . isBuffer ( options . escape ) && Buffer . isBuffer ( options . quote ) && Buffer . compare ( options . escape , options . quote ) === 0 ,
623
- expectedRecordLength : options . columns === null ? 0 : options . columns . length ,
623
+ // columns can be `false`, `true`, `Array`
624
+ expectedRecordLength : Array . isArray ( options . columns ) ? options . columns . length : undefined ,
624
625
field : new ResizeableBuffer ( 20 ) ,
625
626
firstLineToHeaders : fnFirstLineToHeaders ,
626
627
info : Object . assign ( { } , this . info ) ,
Original file line number Diff line number Diff line change @@ -512,7 +512,8 @@ var Parser = /*#__PURE__*/function (_Transform) {
512
512
escaping : false ,
513
513
// escapeIsQuote: options.escape === options.quote,
514
514
escapeIsQuote : Buffer . isBuffer ( options . escape ) && Buffer . isBuffer ( options . quote ) && Buffer . compare ( options . escape , options . quote ) === 0 ,
515
- expectedRecordLength : options . columns === null ? 0 : options . columns . length ,
515
+ // columns can be `false`, `true`, `Array`
516
+ expectedRecordLength : Array . isArray ( options . columns ) ? options . columns . length : undefined ,
516
517
field : new ResizeableBuffer ( 20 ) ,
517
518
firstLineToHeaders : fnFirstLineToHeaders ,
518
519
info : Object . assign ( { } , this . info ) ,
Original file line number Diff line number Diff line change @@ -439,7 +439,8 @@ class Parser extends Transform {
439
439
escaping : false ,
440
440
// escapeIsQuote: options.escape === options.quote,
441
441
escapeIsQuote : Buffer . isBuffer ( options . escape ) && Buffer . isBuffer ( options . quote ) && Buffer . compare ( options . escape , options . quote ) === 0 ,
442
- expectedRecordLength : options . columns === null ? 0 : options . columns . length ,
442
+ // columns can be `false`, `true`, `Array`
443
+ expectedRecordLength : Array . isArray ( options . columns ) ? options . columns . length : undefined ,
443
444
field : new ResizeableBuffer ( 20 ) ,
444
445
firstLineToHeaders : fnFirstLineToHeaders ,
445
446
info : Object . assign ( { } , this . info ) ,
You can’t perform that action at this time.
0 commit comments