A DisposeBag for Combine.
let cancelBag = CancelBag()
myPublisher
.sink { _ in }
.cancel(with: cancelBag)
-
Using Swift Package Manager:
import PackageDescription let package = Package( name: "MyAwesomeApp", dependencies: [ .Package(url: "https://github.com/devxoul/CancelBag", majorVersion: 1), ] )
-
Using CocoaPods:
pod 'CancelBag'
CancelBag is under MIT license. See the LICENSE file for more info.