Skip to content

Commit

Permalink
refactor(csv-parse): js simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Jan 31, 2023
1 parent b8fc9f4 commit 94d628b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions packages/csv-parse/dist/cjs/index.cjs
Expand Up @@ -1319,9 +1319,9 @@ class Parser extends stream.Transform {
return;
}
const err = this.api.parse(buf, false, (record) => {
this.push.call(this, record);
this.push(record);
}, () => {
this.push.call(this, null);
this.push(null);
});
if(err !== undefined){
this.state.stop = true;
Expand All @@ -1334,9 +1334,9 @@ class Parser extends stream.Transform {
return;
}
const err = this.api.parse(undefined, true, (record) => {
this.push.call(this, record);
this.push(record);
}, () => {
this.push.call(this, null);
this.push(null);
});
callback(err);
}
Expand Down
8 changes: 4 additions & 4 deletions packages/csv-parse/dist/esm/index.js
Expand Up @@ -6377,9 +6377,9 @@ class Parser extends Transform {
return;
}
const err = this.api.parse(buf, false, (record) => {
this.push.call(this, record);
this.push(record);
}, () => {
this.push.call(this, null);
this.push(null);
});
if(err !== undefined){
this.state.stop = true;
Expand All @@ -6392,9 +6392,9 @@ class Parser extends Transform {
return;
}
const err = this.api.parse(undefined, true, (record) => {
this.push.call(this, record);
this.push(record);
}, () => {
this.push.call(this, null);
this.push(null);
});
callback(err);
}
Expand Down
8 changes: 4 additions & 4 deletions packages/csv-parse/dist/iife/index.js
Expand Up @@ -6380,9 +6380,9 @@ var csv_parse = (function (exports) {
return;
}
const err = this.api.parse(buf, false, (record) => {
this.push.call(this, record);
this.push(record);
}, () => {
this.push.call(this, null);
this.push(null);
});
if(err !== undefined){
this.state.stop = true;
Expand All @@ -6395,9 +6395,9 @@ var csv_parse = (function (exports) {
return;
}
const err = this.api.parse(undefined, true, (record) => {
this.push.call(this, record);
this.push(record);
}, () => {
this.push.call(this, null);
this.push(null);
});
callback(err);
}
Expand Down
8 changes: 4 additions & 4 deletions packages/csv-parse/dist/umd/index.js
Expand Up @@ -6383,9 +6383,9 @@
return;
}
const err = this.api.parse(buf, false, (record) => {
this.push.call(this, record);
this.push(record);
}, () => {
this.push.call(this, null);
this.push(null);
});
if(err !== undefined){
this.state.stop = true;
Expand All @@ -6398,9 +6398,9 @@
return;
}
const err = this.api.parse(undefined, true, (record) => {
this.push.call(this, record);
this.push(record);
}, () => {
this.push.call(this, null);
this.push(null);
});
callback(err);
}
Expand Down
8 changes: 4 additions & 4 deletions packages/csv-parse/lib/index.js
Expand Up @@ -29,9 +29,9 @@ class Parser extends Transform {
return;
}
const err = this.api.parse(buf, false, (record) => {
this.push.call(this, record);
this.push(record);
}, () => {
this.push.call(this, null);
this.push(null);
});
if(err !== undefined){
this.state.stop = true;
Expand All @@ -44,9 +44,9 @@ class Parser extends Transform {
return;
}
const err = this.api.parse(undefined, true, (record) => {
this.push.call(this, record);
this.push(record);
}, () => {
this.push.call(this, null);
this.push(null);
});
callback(err);
}
Expand Down

0 comments on commit 94d628b

Please sign in to comment.