Browse Source

Return data directly on NodeStream as step function now returns a single row

pull/581/head
Sergi Almacellas Abellana 6 years ago
parent
commit
a0026683f7
  1. 12
      papaparse.js

12
papaparse.js

@ -898,13 +898,11 @@ if (!Array.isArray)
this._onCsvData = function(results) this._onCsvData = function(results)
{ {
var data = results.data; var data = results.data;
for (var i = 0; i < data.length; i++) { if (!stream.push(data) && !this._handle.paused()) {
if (!stream.push(data[i]) && !this._handle.paused()) { // the writeable consumer buffer has filled up
// the writeable consumer buffer has filled up // so we need to pause until more items
// so we need to pause until more items // can be processed
// can be processed this._handle.pause();
this._handle.pause();
}
} }
}; };

Loading…
Cancel
Save