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.
This patch release bumps combine-schedulers and removed an unneeded exported import of Foundation.
This version includes several bug fixes and new operators:
flatMapFirst
operator (#119) - Thanks @troupmarprefix(while:behavior:)
operator (#70) - Thanks @jasdevmapToVoid
operator (#129) - Thanks @danshevlukThis version introduces two changes:
CombineLatestMany
and ZipMany
when working with massive (tens of thousands and up) of publishers.This release is identical to 1.6.0 with the critical fix introduced in #128.
1.6.0 used an overload of map(to:)
which the Swift compiler confuses with the closure-based map(_:)
operator.
This version renames it to mapToValue(_:)
.
retry(when:)
(Thanks @danielt1263)enumerated()
(Thanks @mihai8804858)map(to:)
(Thanks @danhalliday)withLatestFrom
(Thanks @bharath2020)share(replay:)
(Thanks @jabeattie @mRs-)This PR reverts withLatestFrom
to the previous implementation, since the composed (new) implementation was misbehaving in some scenarios.
A Swift 5.5 and Xcode 13 compatible release
It's been a long time since the last release, and this one packs a great deal of changes and updates :) Thanks to all of the wonderful contributors who worked on this release: @kitwtnb, @jasdev, @basvankuijck, @joewalsh, @dsk1306, @HugoSay
Collection.flatMapBatches(of:)
to subscribe an array of publishers in batches (for example, processing batches of 3 requests at a time)toggle()
operator to toggle Boolean publishersnwise()
and pairwise()
operators to batch groups of elementsCollection.merge()
to merge a collection of equally-typed publishersfilterMany
operator to filter publishers that emits collectionsignoreOutput(setOutputType:)
to drop all elements, and altering the Publisher's output typeignoreFailure(setFailureType::completeImmediately:)
to ignore a failure, and alter the Publisher's failure typeReplaySubject
CombineExt 1.2.0 is packed with many awesome additions !
Thanks to @jasdev, @jdisho, @RonKliffer, @ohayon and @dsk1306 for their incredible contributions to this release.
Let's break it down:
.create
ergonomics and support returning a AnyCancellable
[#24]ownership
argument to assign
so you can do assign(to: \.text, on: label, ownership: .weak)
(Ownership supports .weak
, .unowned
and .strong
) [#30]ReplaySubject
[#23]share(replay:)
[#23]withLatestFrom
for up to 4 publishers [#22]prefix(duration:tolerance:in:options:)
to limit the duration for accepting values [#27]Collection.amb()
operators to race a Collection of publishers [#31]Optional.publisher
property as a shorthand to Optional.Publisher.init
[#32]CombineExt 1.1.0 is here, and boy oh boy what a packed release this is ! 🥳🥳🥳🥳
Many thanks to @jasdev and @jdisho for their immense contributions to this release ❤️
zip(with:)
, Collection<Publisher>.zip()
: Variadic ZipcombineLatest(with:)
, Collection<Publisher>.combineLatest()
: Variadic CombineLatestamb(_:)
, amb(with:)
: Takes several publishers and uses the one which emits the first eventmapMany
: Map a publisher of array as if you're mapping each individual element of that arraypartition
: Partition a publisher into two separate publishers based on a provided predicateremoveAllDuplicates
: De-duplicate values across the entire lifetime of the publisher, as opposed to removeDuplicates
which only de-duplicates values pair-wise.setOutputType(to:)
: Set the Output
type of a publisher whose output is Never
, similarly to setFailureType(to:)
.