Closed sandyplace closed 9 years ago
Do you mean something like this?
var a = Kefir.bus();
var b = a.map(function(x) {return x});
a.plug(b.skipDuplicates());
b.log();
a.emit(1);
Heh, that a little crazy. Never thought of that use case, but now maybe I'll use this myself if got to create a circular dependency. Fixed. Thanks!
I am new to this stuff so take any suggestions with a grain of salt. I have noticed that skipDuplicates is implemented like:
This can possibly lead to cycles in the subscribers. for example i have a start and an end time and an hours field. I wanted to recalculate the hours when you enter a new end time and recalculate the end when you update the hours. I was trying to use skipDuplicates to prevent this cycle. I believe this would fix it:
Any thoughts? BTW: thanks for the great library