Browse Source

Better code elimination selection. Revert minified file.

pull/580/head
Jeff Barnes 7 years ago
parent
commit
6f541a04b4
  1. 9
      papaparse.js
  2. 2
      papaparse.min.js

9
papaparse.js

@ -81,7 +81,9 @@ if (!Array.isArray) @@ -81,7 +81,9 @@ if (!Array.isArray)
Papa.FileStreamer = FileStreamer;
Papa.StringStreamer = StringStreamer;
Papa.ReadableStreamStreamer = ReadableStreamStreamer;
if (typeof PAPA_BROWSER_CONTEXT === 'undefined') {
Papa.DuplexStreamStreamer = DuplexStreamStreamer;
}
if (global.jQuery)
{
@ -241,7 +243,7 @@ if (!Array.isArray) @@ -241,7 +243,7 @@ if (!Array.isArray)
}
var streamer = null;
if (_input === Papa.NODE_STREAM_INPUT)
if (_input === Papa.NODE_STREAM_INPUT && typeof PAPA_BROWSER_CONTEXT === 'undefined')
{
// create a node Duplex stream for use
// with .pipe
@ -871,9 +873,7 @@ if (!Array.isArray) @@ -871,9 +873,7 @@ if (!Array.isArray)
function DuplexStreamStreamer(_config) {
if (typeof PAPA_BROWSER_CONTEXT === 'undefined') {
var Duplex = require('stream').Duplex;
var config = copy(_config);
var parseOnWrite = true;
var writeStreamHasFinished = false;
@ -969,9 +969,10 @@ if (!Array.isArray) @@ -969,9 +969,10 @@ if (!Array.isArray)
});
stream.once('finish', bindFunction(this._onWriteComplete, this));
}
}
if (typeof PAPA_BROWSER_CONTEXT === 'undefined') {
DuplexStreamStreamer.prototype = Object.create(ChunkStreamer.prototype);
DuplexStreamStreamer.prototype.constructor = DuplexStreamStreamer;
}
// Use one ParserHandle per entire CSV file or string

2
papaparse.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save