Closed PavelVanecek closed 6 years ago
Hi,
I'm trying to .unpipe a JSONStream.
My code:
var fs = require('fs') var stream = require('JSONStream').parse() fs.createReadStream('package.json').pipe(stream) stream.pipe(process.stdout) stream.unpipe(process.stdout)
Expected result: nothing (the stream is not piped anywhere else)
Actual result:
TypeError: Object #<Stream> has no method 'unpipe'
that is because this is a streams1 stream. if you really want a streams2 one, you could use http://nodejs.org/api/stream.html#stream_readable_wrap_stream
Hi,
I'm trying to .unpipe a JSONStream.
My code:
Expected result: nothing (the stream is not piped anywhere else)
Actual result: