juliangruber/co-read — pull request #2 by MatthewMueller (2014-04-06 02:47:51+00:00)
Title: clean up read1 streams

Hey so I wanted to take a stab at cleaning up the streams1 implementation. The tests are passing just fine including the backpressure one.

Haven't worked with streams too much so I definitely could be missing something. Two open questions about streams1 right off the top:

1) should we be pausing immediately?
2) does `stream.on('end', fn)` ever have data based through it

Overall I think this change will make read streams with generators easier to understand. The yield within a yield was a big of a mindfuck for me at least, haha.