I run the code in a command with node; This is an error when the code looks like this:
> var rs = new require('stream').Readable();
> rs.push("123");rs.push(null);
but this is a mistake:
> var rs = new require('stream').Readable();
> rs.push("123");
events.js:72
throw er;
^
Error: not implemented
at Readable._read (_stream_readable.js:446:22)
at Readable.read (_stream_readable.js:320:10)
at maybeReadMore_ (_stream_readable.js:431:12)
at _stream_readable.js:422:7
at process._tickCallback (node.js:415:13)
I need code like this:
var rs = new require('stream').Readable();
rs.pipe(someWriteAbleStream)
rs.push(somedata);
rs.push(somedata);
rs.push(null);
thank
source
share