Swiftpack.co - artem-y/combineer as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by artem-y.
artem-y/combineer v0.2.0
Helpers to use with Combine framework.
⭐️ 1
🕓 28 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/artem-y/combineer.git", from: "v0.2.0")


Lightweight collection of helpers and tools to make working with Apple's Combine framework more convenient and decrease the amount of Combine-related boilerplate code.
Please feel free to request some nice-to-have features or point out the things that need improvement.

What's included


Class-bound protocol that provides bind methods to use instead of the standard sink+store to make call sites cleaner.
For example, instead of this

    .sink { [weak self] value in
        self?.doSomething(with: value)
    .store(in: cancellables)

objects that conform to BindingObject can now bind the received value as follows:

bind(somePublisher) { [weak self] value in
    self?.doSomething(with: value)

bindOnMainQueue accomplishes the same but receives on the DispatchQueue.main scheduler.

bind(_:, to:) and bindOnMainQueue(_:, to:) methods allow passing the value of a publisher to a subject:

bind(myPublisher, to: mySubject)


Stars: 1
Last commit: 28 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

v0.2.0: Binding to subject
28 weeks ago

What's Changed

Full Changelog: https://github.com/artem-y/combineer/compare/v0.1.1...v0.2.0

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics