Closed calvinmetcalf closed 10 years ago
PR? I really have no idea what I'm doing when it comes to streams. I couldn't even figure out how to write the unit tests without using fs
.
for testing, know what you can use? https://github.com/calvinmetcalf/random-document-stream
so the way you tend to communicate with a stream is not object.method(stream);
but usually more like object.method().pipe(stream)
in other words to put data into a writable stream you return a readable stream you don't directly put it in.
So what you mean by "real stream" is that the WritableStreamPouch
inherits from the TransformStream
? Also, what is the point of the through2
stream, anyway?
I suppose if what you're saying is true then I should also look into renaming the load
and dump
methods to just use stream methods like pipe
and write
. It looks like that would conflict with pouch-stream
, though.
You will thank me later, you can use the noms module I just created