Skip to content

Commit 94d628b

Browse files
committed
refactor(csv-parse): js simplification
1 parent b8fc9f4 commit 94d628b

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

packages/csv-parse/dist/cjs/index.cjs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1319,9 +1319,9 @@ class Parser extends stream.Transform {
13191319
return;
13201320
}
13211321
const err = this.api.parse(buf, false, (record) => {
1322-
this.push.call(this, record);
1322+
this.push(record);
13231323
}, () => {
1324-
this.push.call(this, null);
1324+
this.push(null);
13251325
});
13261326
if(err !== undefined){
13271327
this.state.stop = true;
@@ -1334,9 +1334,9 @@ class Parser extends stream.Transform {
13341334
return;
13351335
}
13361336
const err = this.api.parse(undefined, true, (record) => {
1337-
this.push.call(this, record);
1337+
this.push(record);
13381338
}, () => {
1339-
this.push.call(this, null);
1339+
this.push(null);
13401340
});
13411341
callback(err);
13421342
}

packages/csv-parse/dist/esm/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6377,9 +6377,9 @@ class Parser extends Transform {
63776377
return;
63786378
}
63796379
const err = this.api.parse(buf, false, (record) => {
6380-
this.push.call(this, record);
6380+
this.push(record);
63816381
}, () => {
6382-
this.push.call(this, null);
6382+
this.push(null);
63836383
});
63846384
if(err !== undefined){
63856385
this.state.stop = true;
@@ -6392,9 +6392,9 @@ class Parser extends Transform {
63926392
return;
63936393
}
63946394
const err = this.api.parse(undefined, true, (record) => {
6395-
this.push.call(this, record);
6395+
this.push(record);
63966396
}, () => {
6397-
this.push.call(this, null);
6397+
this.push(null);
63986398
});
63996399
callback(err);
64006400
}

packages/csv-parse/dist/iife/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6380,9 +6380,9 @@ var csv_parse = (function (exports) {
63806380
return;
63816381
}
63826382
const err = this.api.parse(buf, false, (record) => {
6383-
this.push.call(this, record);
6383+
this.push(record);
63846384
}, () => {
6385-
this.push.call(this, null);
6385+
this.push(null);
63866386
});
63876387
if(err !== undefined){
63886388
this.state.stop = true;
@@ -6395,9 +6395,9 @@ var csv_parse = (function (exports) {
63956395
return;
63966396
}
63976397
const err = this.api.parse(undefined, true, (record) => {
6398-
this.push.call(this, record);
6398+
this.push(record);
63996399
}, () => {
6400-
this.push.call(this, null);
6400+
this.push(null);
64016401
});
64026402
callback(err);
64036403
}

packages/csv-parse/dist/umd/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6383,9 +6383,9 @@
63836383
return;
63846384
}
63856385
const err = this.api.parse(buf, false, (record) => {
6386-
this.push.call(this, record);
6386+
this.push(record);
63876387
}, () => {
6388-
this.push.call(this, null);
6388+
this.push(null);
63896389
});
63906390
if(err !== undefined){
63916391
this.state.stop = true;
@@ -6398,9 +6398,9 @@
63986398
return;
63996399
}
64006400
const err = this.api.parse(undefined, true, (record) => {
6401-
this.push.call(this, record);
6401+
this.push(record);
64026402
}, () => {
6403-
this.push.call(this, null);
6403+
this.push(null);
64046404
});
64056405
callback(err);
64066406
}

packages/csv-parse/lib/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class Parser extends Transform {
2929
return;
3030
}
3131
const err = this.api.parse(buf, false, (record) => {
32-
this.push.call(this, record);
32+
this.push(record);
3333
}, () => {
34-
this.push.call(this, null);
34+
this.push(null);
3535
});
3636
if(err !== undefined){
3737
this.state.stop = true;
@@ -44,9 +44,9 @@ class Parser extends Transform {
4444
return;
4545
}
4646
const err = this.api.parse(undefined, true, (record) => {
47-
this.push.call(this, record);
47+
this.push(record);
4848
}, () => {
49-
this.push.call(this, null);
49+
this.push(null);
5050
});
5151
callback(err);
5252
}

0 commit comments

Comments
 (0)