kefirjs / kefir

A Reactive Programming library for JavaScript
https://kefirjs.github.io/kefir/
MIT License
1.87k stars 97 forks source link

Convert Pool to Stream? #239

Closed mAAdhaTTah closed 7 years ago

mAAdhaTTah commented 7 years ago

I have a Pool that I need to use to plug, and I want to pass that Pool into a user-defined function, but I don't want that function to be able to plug into that Pool. Is there a preferred way to cut off that functionality?

rpominov commented 7 years ago

Hey! pool.changes() should do the trick, except it will also ignore current values from the pool. So if you, for example, want to add Kefir.constant()s to the pool before you subscribe to it, you should convert it to a property instead using pool.toProperty().

mAAdhaTTah commented 7 years ago

Perfect, that should do it. Thanks!