Skip to content

Commit

Permalink
refactor(csv-parse): remove unrequired condition
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Jun 29, 2022
1 parent bfc44a0 commit 737ac66
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 18 deletions.
3 changes: 1 addition & 2 deletions packages/csv-parse/dist/cjs/index.cjs
Expand Up @@ -851,14 +851,13 @@ const transform = function(original_options = {}) {
if(lappend === true && rappend === true){
this.state.field.append(chr);
}else if(rtrim === true && !this.__isCharTrimable(chr)){
const err = this.__error(
return this.__error(
new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [
'Invalid Closing Quote:',
'found non trimable byte after quote',
`at line ${this.info.lines}`,
], this.options, this.__infoField())
);
if(err !== undefined) return err;
}
}
if(end === true){
Expand Down
3 changes: 1 addition & 2 deletions packages/csv-parse/dist/cjs/sync.cjs
Expand Up @@ -849,14 +849,13 @@ const transform = function(original_options = {}) {
if(lappend === true && rappend === true){
this.state.field.append(chr);
}else if(rtrim === true && !this.__isCharTrimable(chr)){
const err = this.__error(
return this.__error(
new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [
'Invalid Closing Quote:',
'found non trimable byte after quote',
`at line ${this.info.lines}`,
], this.options, this.__infoField())
);
if(err !== undefined) return err;
}
}
if(end === true){
Expand Down
3 changes: 1 addition & 2 deletions packages/csv-parse/dist/esm/index.js
Expand Up @@ -5907,14 +5907,13 @@ const transform = function(original_options = {}) {
if(lappend === true && rappend === true){
this.state.field.append(chr);
}else if(rtrim === true && !this.__isCharTrimable(chr)){
const err = this.__error(
return this.__error(
new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [
'Invalid Closing Quote:',
'found non trimable byte after quote',
`at line ${this.info.lines}`,
], this.options, this.__infoField())
);
if(err !== undefined) return err;
}
}
if(end === true){
Expand Down
3 changes: 1 addition & 2 deletions packages/csv-parse/dist/esm/sync.js
Expand Up @@ -2817,14 +2817,13 @@ const transform = function(original_options = {}) {
if(lappend === true && rappend === true){
this.state.field.append(chr);
}else if(rtrim === true && !this.__isCharTrimable(chr)){
const err = this.__error(
return this.__error(
new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [
'Invalid Closing Quote:',
'found non trimable byte after quote',
`at line ${this.info.lines}`,
], this.options, this.__infoField())
);
if(err !== undefined) return err;
}
}
if(end === true){
Expand Down
3 changes: 1 addition & 2 deletions packages/csv-parse/dist/iife/index.js
Expand Up @@ -5910,14 +5910,13 @@ var csv_parse = (function (exports) {
if(lappend === true && rappend === true){
this.state.field.append(chr);
}else if(rtrim === true && !this.__isCharTrimable(chr)){
const err = this.__error(
return this.__error(
new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [
'Invalid Closing Quote:',
'found non trimable byte after quote',
`at line ${this.info.lines}`,
], this.options, this.__infoField())
);
if(err !== undefined) return err;
}
}
if(end === true){
Expand Down
3 changes: 1 addition & 2 deletions packages/csv-parse/dist/iife/sync.js
Expand Up @@ -2820,14 +2820,13 @@ var csv_parse_sync = (function (exports) {
if(lappend === true && rappend === true){
this.state.field.append(chr);
}else if(rtrim === true && !this.__isCharTrimable(chr)){
const err = this.__error(
return this.__error(
new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [
'Invalid Closing Quote:',
'found non trimable byte after quote',
`at line ${this.info.lines}`,
], this.options, this.__infoField())
);
if(err !== undefined) return err;
}
}
if(end === true){
Expand Down
3 changes: 1 addition & 2 deletions packages/csv-parse/dist/umd/index.js
Expand Up @@ -5913,14 +5913,13 @@
if(lappend === true && rappend === true){
this.state.field.append(chr);
}else if(rtrim === true && !this.__isCharTrimable(chr)){
const err = this.__error(
return this.__error(
new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [
'Invalid Closing Quote:',
'found non trimable byte after quote',
`at line ${this.info.lines}`,
], this.options, this.__infoField())
);
if(err !== undefined) return err;
}
}
if(end === true){
Expand Down
3 changes: 1 addition & 2 deletions packages/csv-parse/dist/umd/sync.js
Expand Up @@ -2823,14 +2823,13 @@
if(lappend === true && rappend === true){
this.state.field.append(chr);
}else if(rtrim === true && !this.__isCharTrimable(chr)){
const err = this.__error(
return this.__error(
new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [
'Invalid Closing Quote:',
'found non trimable byte after quote',
`at line ${this.info.lines}`,
], this.options, this.__infoField())
);
if(err !== undefined) return err;
}
}
if(end === true){
Expand Down
3 changes: 1 addition & 2 deletions packages/csv-parse/lib/api/index.js
Expand Up @@ -288,14 +288,13 @@ const transform = function(original_options = {}) {
if(lappend === true && rappend === true){
this.state.field.append(chr);
}else if(rtrim === true && !this.__isCharTrimable(chr)){
const err = this.__error(
return this.__error(
new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [
'Invalid Closing Quote:',
'found non trimable byte after quote',
`at line ${this.info.lines}`,
], this.options, this.__infoField())
);
if(err !== undefined) return err;
}
}
if(end === true){
Expand Down

0 comments on commit 737ac66

Please sign in to comment.