Skip to content

Commit 0f6ab7c

Browse files
committed
Add all RxSwift operators and mark those that don't exist in Combine
1 parent eaf99c9 commit 0f6ab7c

File tree

4 files changed

+104
-49
lines changed

4 files changed

+104
-49
lines changed

Data/operators.csv

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,60 @@ catchErrorJustReturn,replaceError(with:),
88
combineLatest,"combineLatest, tryCombineLatest",
99
compactMap,"compactMap, tryCompactMap",
1010
concat,"append, prepend",
11+
concatMap,❌,
12+
create,AnyPublisher,"AnyPublisher has an initializer with an anonymous closure, similar to Observable.create"
1113
debounce,debounce,
1214
debug,print,
15+
ifEmpty(default:),❌,
16+
ifEmpty(switchTo:),replaceEmpty(with:),
17+
deferred,Publishers.Deferred,
1318
delay,delay,
19+
delaySubscription,❌,
20+
dematerialize,❌,
1421
distinctUntilChanged,"removeDuplicates, tryRemoveDuplicates",
1522
do,handleEvents,
16-
enumerated + skipWhile + take,"output(at:), output(in:)",
23+
elementAt,output(at:),
24+
empty,❌,
25+
enumerated,❌,
26+
error,Publishers.Once,Publishers.Once has an initializer that takes an Error
1727
filter,"filter, tryFilter",
1828
first,"first, tryFirst",
1929
flatMap,flatMap,
30+
flatMapFirst,❌,
2031
flatMapLatest,switchToLatest,
21-
ignoreElements(),ignoreOutput(),
22-
just(),Publishers.Just(),
32+
from,❌,
33+
groupBy,❌,
34+
ignoreElements,ignoreOutput,
35+
interval,❌,
36+
just,Publishers.Just,
2337
map,"map, tryMap",
38+
materialize,❌,
2439
merge,"merge, tryMerge",
2540
multicast,multicast,
41+
never,❌,
2642
observeOn,receive(on:),
43+
of,❌,
44+
range,❌,
2745
reduce,"reduce, tryReduce",
46+
repeatElement,❌,
2847
"retry, retry(3)","retry, retry(3)",
48+
retryWhen,❌,
49+
sample,❌,
2950
scan,"scan, tryScan",
30-
share,share,"There doesn't seem to be a share(replay: 1) in Combine, yet"
51+
share,share,"There’s no replay in Combine, and no scope. Could be “faked” with multicast."
3152
skip(3),dropFirst(3),
3253
skipUntil,drop(untilOutputFrom:),
3354
skipWhile,"drop(while:), tryDrop(while:)",
55+
startWith,❌,
3456
subscribe,sink,
3557
subscribeOn,subscribe(on:),"RxSwift uses Schedulers Combine uses RunLoop, DispatchQueue, and OperationQueue."
3658
take(3).toArray(),collect(3),
3759
takeLast,last,
60+
takeUntil,prefix(untilOutputFrom:),
3861
throttle,throttle,
3962
timeout,timeout,
63+
timer,❌,
4064
toArray(),collect(),
41-
zip,zip,
65+
window,collect(Publishers.TimeGroupingStrategy),Combine has a TimeGroupingStrategy.byTimeOrCount that could be used as a window.
66+
withLatestFrom,❌,
67+
zip,zip,

0 commit comments

Comments
 (0)