I've started playing with RxJS5, and now see that there is no longer a
That question is best answered by members who participate in Rxjs5, but here is my take:
multicastoperator with a
ReplaySubject, followed by a
refCount. So I would bet that
publishReplay(x).refCount()should be quite close to the
shareReplaybehaviour. In any case,
publishReplayalready gives you all the points you mentioned. The
refCountadds the unsubscription when there is no more observers (
refCountdecreased to 0).
var replayed = source.publishReplay(1).refCount();, that should be equivalent to your
About the rest of your question:
good reference that shows how to find what kind of observable I have.... There are many places, including Rxjs4 documentation where you find explanations about hot and cold observables.
Follows my own present understanding of the matter:
multicastoperator and its derivatives
shareReplayetc. Those operators internally all involve subjects.
Rx.Observable.fromEvent('input','click')is hot. You can see in its implementation that there is a
connectablekind which till it is connected, is neither hot nor cold.
deferalways give rise to a cold observable.
op1.op2.groupByis cold, but it will emit hot observables as values in the resulting stream. In those cases, only the documentation (if any) can help you find out. Otherwise, the source code, and the test specs. Or asking on SO.