Is there any way to create a Property that represents the current set of subscribers on a given observable?
For example:
const obs = Kefir.fromPoll(100, () => "anything");
const obsSubscribers = obs.subscribers(); // << imaginary function
obsSubscribers.log();
setTimeout(() => {
const fn = () => {...}
const first = obs.onAny(fn);
setTimeout(() => obs.offAny(fn), 2000)
}, 1000);
setTimeout(() => {
const second = obs.onAny(...);
}, 2000);
s[0]----s[1]----s[2]----s[3]---
================
s[0] = [] << obs does not have any subscribers
s[1] = [first]
s[2] = [first, second]
s[3] = [second]
Or maybe just a boolean property that tracks whether or not the observable is active?
Is there any way to create a Property that represents the current set of subscribers on a given observable?
For example:
Or maybe just a boolean property that tracks whether or not the observable is active?