|
|
|
@ -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
|
|
|
|
|