Skip to content

Commit

Permalink
pipe https data code refinements (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomFractals committed Feb 1, 2022
1 parent 8669cd1 commit 8c00502
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/views/tableView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ export class TableView {
}); */

// TODO: move CSV data parsing to loaders/readers

// create Papa parse data stream for CSV data parsing in a worker thread
const parseDataStream: Writable =
Papa.parse(Papa.NODE_STREAM_INPUT, this.getDataParseOptions());
Expand All @@ -270,8 +269,8 @@ export class TableView {
if (this._fileInfo.isRemote) {
try {
// get remote data
const dataRequest: ClientRequest =
https.get(this._fileInfo.fileUrl, (response: Readable) => {
const dataRequest: ClientRequest = https.get(this._fileInfo.fileUrl, (response: Readable) => {
// pipe data response to parse data stream
dataFileStream = response;
dataStream = dataFileStream.pipe(parseDataStream);
this.processData(dataStream);
Expand Down

0 comments on commit 8c00502

Please sign in to comment.