-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to convert an event emitter to a Stream #242
Comments
@mspoulsen welcome back😛I don’t know if this https://github.com/mostjs-community/from-event/blob/master/README.md supports the new mostjs core but there you have it support event emitters. Again I think it’s pretty simple to extract the source/sink pattern and create your own operators that you can submit to the community etc |
I have created my own adapters using the pattern from |
Sweet glad to help |
looks like this is also good to close 👍 |
how emit/receive multiple arguments? |
Yesterday I posted an issue regarding
@most/create
: #241It was closed because we all thought we had a solution. But I don't think we do. So I have taken the liberty to create similar but slightly different issue. My question is:
How do I turn event emitters into a Stream? 😮
Event emitters come in many flavors. It could be a socket.io connection or like the example below, an animation library (this example is from popmotion):
Promises
will not work, since aPromise
only returns one value and I need to be able to push values to the Stream as they arrive.most/create
create
from the@most/create
package would work. This function makes it nice and simple to push values to a stream, making it easy to write adapters for almost anything:However,
@most/create
does not seem to be compatible with@most/core
? The typeStream
have changed in@most/core
.Are there any plans to update the
@most/create
package?Or can this be done using operators (that I am missing) in
@most/core
?Thanks in advance!
The text was updated successfully, but these errors were encountered: