2 ms·
> "ditching built-in streams and replacing them with something decent" What have you found sufficient for this?
by xhrpost 12y ago
> "ditching built-in streams and replacing them with something decent"
What have you found sufficient for this?
- glibgil 12y agoThey just told you: Bluebird and streams 3. Did you get bored and stop reading?
- juliangregorian 12y agoOoh, swing and a miss. Bluebird is not a streams replacement, streams 3 IS the built-in streams. Maybe save the snark for situations where you actually have a clue.
- glibgil 12y agoBluebird is for promises. Mentioned above if you read.
- spion 12y agoWe have an inhouse solution which is basically a set of external functions that work with built in streams in a way that avoids frustration. Some of them can be found in https://github.com/spion/promise-streams https://github.com/spion/promise-streams - the others we haven't extracted to an npm module yet. (Promise streams also has a minimal extension of built in streams to make them work better with promises). We never managed to find a full replacement though. Probably not worth the effort either given that it will always have to wrap existing streams, and the only drawback of external functions is that you cannot invoke them as methods. Although, one contender that I have hopes for is WHATWG streams [1]. note: to replace event emitters we built https://github.com/doxout/promise-observer https://github.com/doxout/promise-observer which gives you a lot more power and control in terms of execution order and goes away with the "multiple events per object" stringy design that makes things harder for typesystems like typescript/flow. [1]: https://github.com/whatwg/streams https://github.com/whatwg/streams