CombineExt
CombineExt copied to clipboard
CombineExt provides a collection of operators, publishers and utilities for Combine, that are not provided by Apple themselves, but are common in other Reactive Frameworks and standards.
I was wondering if there was a reason to not include in this (awesome) library some utility methods to simplify usage of Just, Fail and Empty, which requires an `eraseToAnyPublisher()`...
fixes #155 I'm not sure if creating a `AnyPublisher.swift` file is the proper way to go, let me know :)
Now **RetryWhen** subscribes to upstream twice. This is because the **Sink** itself subscribes to the upstream in _**.init**_. Test _**testSuccessfulRetry**_() checks the number of subscriptions, but not correctly. It should...
A suggestion for adding the `sample(with:)` and `sample:(on)` operators as seen in [ReactiveSwift](https://reactivecocoa.io/reactiveswift/docs/latest/Classes/Signal.html#/s:13ReactiveSwift6SignalC6sample4withACyx_qd__tq_GACyqd__s5NeverOG_tlF). Essentially a convenient reverse of `withLatestFrom`.
For convenience, added a sink() that can be subscribe without subscriber.
Continuation of [Update testSuccessfulRetry and code to make it pass. #150](https://github.com/CombineCommunity/CombineExt/pull/150) ### First commit 1. When **RetryWhen** changes upstream to **Sink**, the subscription to the previous upstream must be canceled...
```swift final class ViewModel { let nodes = CurrentValueSubject([]) var cancel: AnyCancellable? init() { cancel = nodes .dropFirst() .filter { !$0.isEmpty } .withLatestFrom(nodes) .sink { [weak self] nodes in guard...