From 97d1096dab02d568a4fe22c5b8e7b38ab7c7b4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petrus=20Nguy=E1=BB=85n=20Th=C3=A1i=20H=E1=BB=8Dc?= Date: Fri, 18 Mar 2022 13:03:58 +0700 Subject: [PATCH 1/3] docs: readme --- README.md | 111 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 90 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index f9429cd0..a2656c9a 100644 --- a/README.md +++ b/README.md @@ -17,33 +17,89 @@ ![badge][badge-windows] [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fhoc081098%2FFlowExt&count_bg=%2379C83D&title_bg=%23555555&icon=kotlin.svg&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com) -Kotlinx Coroutines Flow Extensions. -Extensions to the Kotlin Flow library. -Kotlin Flow extensions. +Kotlinx Coroutines Flow Extensions. Extensions to the Kotlin Flow library. Kotlin Flow extensions. Multiplatform Kotlinx +Coroutines Flow Extensions. Multiplatform Extensions to the Kotlin Flow library. Multiplatform Kotlin Flow extensions. +RxJS Kotlin Coroutines Flow. RxSwift Kotlin Coroutines Flow. RxJava Kotlin Coroutines Flow. RxJS Kotlin Flow. RxSwift +Kotlin Flow. RxJava Kotlin Flow. RxJS Coroutines Flow. RxSwift Coroutines Flow. RxJava Coroutines Flow. ## Author: [Petrus Nguyễn Thái Học](https://github.com/hoc081098) ## API -### Docs: https://hoc081098.github.io/FlowExt/docs/0.x +### Release docs: https://hoc081098.github.io/FlowExt/docs/0.x + ### Snapshot docs: https://hoc081098.github.io/FlowExt/docs/latest -- **`bufferCount`** (similar to [RxJS bufferCount](https://rxjs.dev/api/operators/bufferCount), [RxJava buffer](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Observable.html#buffer-int-int-)) -- **`concat`** (similar to [RxJS concat](https://rxjs.dev/api/index/function/concat), [RxJava concat](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#concat-java.lang.Iterable-)) -- **`concatWith`** (similar to [RxJS concatWith](https://rxjs.dev/api/operators/concatWith), [RxJava concatWith](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#concatWith-org.reactivestreams.Publisher-)) -- **`startWith`** (similar to [RxJS startWith](https://rxjs.dev/api/operators/startWith), [RxJava startWith](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#startWithItem-T-)) -- **`flatMapFirst`**/**`exhaustMap`** (similar to [RxJS exhaustMap](https://rxjs.dev/api/operators/exhaustMap), [RxSwift flatMapFirst](https://github.com/ReactiveX/RxSwift/blob/b48f2e9536cd985d912126709b97bd743e58c8fc/RxSwift/Observables/Merge.swift#L37)) -- **`interval`** (similar to [RxJS interval](https://rxjs.dev/api/index/function/interval)) -- **`flattenFirst`**/**`exhaustAll`** (similar to [RxJS exhaustAll](https://rxjs.dev/api/operators/exhaustAll)) -- **`mapTo`** (similar to [RxJS mapTo](https://rxjs.dev/api/operators/mapTo)) -- **`materialize`** (similar to [RxJS materialize](https://rxjs.dev/api/operators/materialize), [RxJava materialize](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#materialize--)) -- **`dematerialize`** (similar to [RxJS dematerialize](https://rxjs.dev/api/operators/dematerialize), [RxJava dematerialize](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#dematerialize--)) -- **`range`** (http://reactivex.io/documentation/operators/range.html) (similar to [RxJS range](https://rxjs.dev/api/index/function/range)) -- **`takeUntil`** (http://reactivex.io/documentation/operators/takeuntil.html) (similar to [RxJS takeUntil](https://rxjs.dev/api/operators/takeUntil)) -- **`timer`** (http://reactivex.io/documentation/operators/timer.html) (similar to [RxJS timer](https://rxjs.dev/api/index/function/timer)) -- **`withLatestFrom`** (https://rxmarbles.com/#withLatestFrom) (similar to [RxJS withLatestFrom](https://rxjs.dev/api/operators/withLatestFrom)) - -... and more, please check out [Docs 0.x](https://hoc081098.github.io/FlowExt/docs/0.x)/[Docs snapshot](https://hoc081098.github.io/FlowExt/docs/latest). +### Table of contents + +- Create + - [`concat`](#concat) + - [`interval`](#interval) + - [`neverFlow`](#neverFlow) + - [`range`](#range) + - `timer` +- Intermediate operators + - `bufferCount` + - `concatWith` + - `startWith` + - `flatMapFirst` + - `mapIndexed` + - `mapTo` + - `materialize` + - `dematerialize` + - `retryWhenWithDelayStrategy` + - `retryWhenWithExponentialBackoff` + - `retryWithExponentialBackoff` + - `takeUntil` + - `throttle` + - `throttleTime` + - `withLatestFrom` + +- **`bufferCount`** (similar to [RxJS bufferCount](https://rxjs.dev/api/operators/bufferCount) + , [RxJava buffer](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Observable.html#buffer-int-int-)) + +#### concat + +- Similar to [RxJS concat](https://rxjs.dev/api/index/function/concat) +- Similar + to [RxJava concat](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#concat-java.lang.Iterable-) + +#### interval + +- Similar to [RxJS interval](https://rxjs.dev/api/index/function/interval) + +#### neverFlow + +- Similar to [RxJS NEVER](https://rxjs.dev/api/index/const/NEVER) + +#### range + +- ReactiveX docs: http://reactivex.io/documentation/operators/range.html +- Similar to [RxJS range](https://rxjs.dev/api/index/function/range) + +- **`concatWith`** (similar to [RxJS concatWith](https://rxjs.dev/api/operators/concatWith) + , [RxJava concatWith](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#concatWith-org.reactivestreams.Publisher-)) +- **`startWith`** (similar to [RxJS startWith](https://rxjs.dev/api/operators/startWith) + , [RxJava startWith](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#startWithItem-T-)) +- **`flatMapFirst`**/**`exhaustMap`** (similar to [RxJS exhaustMap](https://rxjs.dev/api/operators/exhaustMap) + , [RxSwift flatMapFirst](https://github.com/ReactiveX/RxSwift/blob/b48f2e9536cd985d912126709b97bd743e58c8fc/RxSwift/Observables/Merge.swift#L37)) + +- **`flattenFirst`**/**`exhaustAll`** (similar to [RxJS exhaustAll](https://rxjs.dev/api/operators/exhaustAll)) +- **`mapTo`** (similar to [RxJS mapTo](https://rxjs.dev/api/operators/mapTo)) +- **`materialize`** (similar to [RxJS materialize](https://rxjs.dev/api/operators/materialize) + , [RxJava materialize](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#materialize--)) +- **`dematerialize`** (similar to [RxJS dematerialize](https://rxjs.dev/api/operators/dematerialize) + , [RxJava dematerialize](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#dematerialize--)) + +- **`takeUntil`** (http://reactivex.io/documentation/operators/takeuntil.html) (similar + to [RxJS takeUntil](https://rxjs.dev/api/operators/takeUntil)) +- **`timer`** (http://reactivex.io/documentation/operators/timer.html) (similar + to [RxJS timer](https://rxjs.dev/api/index/function/timer)) +- **`withLatestFrom`** (https://rxmarbles.com/#withLatestFrom) (similar + to [RxJS withLatestFrom](https://rxjs.dev/api/operators/withLatestFrom)) + +... and more, please check out [Docs 0.x](https://hoc081098.github.io/FlowExt/docs/0.x)/[Docs +snapshot](https://hoc081098.github.io/FlowExt/docs/latest). ## Installation @@ -63,11 +119,13 @@ implementation("io.github.hoc081098:FlowExt:0.2.0") ``` ### JVM / Android only + ```groovy implementation("io.github.hoc081098:FlowExt-jvm:0.2.0") ``` ### Native binaries + ```groovy implementation("io.github.hoc081098:FlowExt-iosx64:0.2.0") implementation("io.github.hoc081098:FlowExt-iosarm64:0.2.0") @@ -88,6 +146,7 @@ implementation("io.github.hoc081098:FlowExt-linuxx64:0.2.0") Snapshots of the development version are available in Sonatype's snapshots repository. - Kotlin + ```kotlin allprojects { repositories { @@ -102,6 +161,7 @@ dependencies { ``` - Groovy + ```groovy allprojects { repositories { @@ -115,7 +175,6 @@ dependencies { } ``` - ## License ```License @@ -125,13 +184,23 @@ Copyright (c) 2021 Petrus Nguyễn Thái Học ``` [badge-android]: http://img.shields.io/badge/platform-android-6EDB8D.svg?style=flat + [badge-ios]: http://img.shields.io/badge/platform-ios-CDCDCD.svg?style=flat + [badge-js]: http://img.shields.io/badge/platform-js-F8DB5D.svg?style=flat + [badge-jvm]: http://img.shields.io/badge/platform-jvm-DB413D.svg?style=flat + [badge-linux]: http://img.shields.io/badge/platform-linux-2D3F6C.svg?style=flat + [badge-windows]: http://img.shields.io/badge/platform-windows-4D76CD.svg?style=flat + [badge-mac]: http://img.shields.io/badge/platform-macos-111111.svg?style=flat + [badge-watchos]: http://img.shields.io/badge/platform-watchos-C0C0C0.svg?style=flat + [badge-tvos]: http://img.shields.io/badge/platform-tvos-808080.svg?style=flat + [badge-wasm]: https://img.shields.io/badge/platform-wasm-624FE8.svg?style=flat + [badge-nodejs]: https://img.shields.io/badge/platform-nodejs-68a063.svg?style=flat From 236b630706dd9985996396ccd88bfb7a44874c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petrus=20Nguy=E1=BB=85n=20Th=C3=A1i=20H=E1=BB=8Dc?= Date: Fri, 18 Mar 2022 13:16:01 +0700 Subject: [PATCH 2/3] docs: readme --- README.md | 95 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 65 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index a2656c9a..2b35d14b 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Kotlin Flow. RxJava Kotlin Flow. RxJS Coroutines Flow. RxSwift Coroutines Flow. ## API -### Release docs: https://hoc081098.github.io/FlowExt/docs/0.x +### 0.x release docs: https://hoc081098.github.io/FlowExt/docs/0.x ### Snapshot docs: https://hoc081098.github.io/FlowExt/docs/latest @@ -37,23 +37,26 @@ Kotlin Flow. RxJava Kotlin Flow. RxJS Coroutines Flow. RxSwift Coroutines Flow. - [`interval`](#interval) - [`neverFlow`](#neverFlow) - [`range`](#range) - - `timer` + - [`timer`](#timer) - Intermediate operators - `bufferCount` - - `concatWith` - - `startWith` - - `flatMapFirst` + - [`concatWith`](#concatWith) + - [`startWith`](#startWith) + - [`flatMapFirst`](#flatMapFirst) + - [`exhaustMap`](#flatMapFirst) + - [`flattenFirst`](#flattenFirst) + - [`exhaustAll`](#flattenFirst) - `mapIndexed` - - `mapTo` - - `materialize` - - `dematerialize` + - [`mapTo`](#mapTo) + - [`materialize`](#materialize) + - [`dematerialize`](#dematerialize) - `retryWhenWithDelayStrategy` - `retryWhenWithExponentialBackoff` - `retryWithExponentialBackoff` - - `takeUntil` + - [`takeUntil`](#takeUntil) - `throttle` - `throttleTime` - - `withLatestFrom` + - [`withLatestFrom`](#withLatestFrom) - **`bufferCount`** (similar to [RxJS bufferCount](https://rxjs.dev/api/operators/bufferCount) , [RxJava buffer](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Observable.html#buffer-int-int-)) @@ -77,26 +80,58 @@ Kotlin Flow. RxJava Kotlin Flow. RxJS Coroutines Flow. RxSwift Coroutines Flow. - ReactiveX docs: http://reactivex.io/documentation/operators/range.html - Similar to [RxJS range](https://rxjs.dev/api/index/function/range) -- **`concatWith`** (similar to [RxJS concatWith](https://rxjs.dev/api/operators/concatWith) - , [RxJava concatWith](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#concatWith-org.reactivestreams.Publisher-)) -- **`startWith`** (similar to [RxJS startWith](https://rxjs.dev/api/operators/startWith) - , [RxJava startWith](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#startWithItem-T-)) -- **`flatMapFirst`**/**`exhaustMap`** (similar to [RxJS exhaustMap](https://rxjs.dev/api/operators/exhaustMap) - , [RxSwift flatMapFirst](https://github.com/ReactiveX/RxSwift/blob/b48f2e9536cd985d912126709b97bd743e58c8fc/RxSwift/Observables/Merge.swift#L37)) - -- **`flattenFirst`**/**`exhaustAll`** (similar to [RxJS exhaustAll](https://rxjs.dev/api/operators/exhaustAll)) -- **`mapTo`** (similar to [RxJS mapTo](https://rxjs.dev/api/operators/mapTo)) -- **`materialize`** (similar to [RxJS materialize](https://rxjs.dev/api/operators/materialize) - , [RxJava materialize](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#materialize--)) -- **`dematerialize`** (similar to [RxJS dematerialize](https://rxjs.dev/api/operators/dematerialize) - , [RxJava dematerialize](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#dematerialize--)) - -- **`takeUntil`** (http://reactivex.io/documentation/operators/takeuntil.html) (similar - to [RxJS takeUntil](https://rxjs.dev/api/operators/takeUntil)) -- **`timer`** (http://reactivex.io/documentation/operators/timer.html) (similar - to [RxJS timer](https://rxjs.dev/api/index/function/timer)) -- **`withLatestFrom`** (https://rxmarbles.com/#withLatestFrom) (similar - to [RxJS withLatestFrom](https://rxjs.dev/api/operators/withLatestFrom)) +#### timer + +- ReactiveX docs: http://reactivex.io/documentation/operators/timer.html +- Similar to [RxJS timer](https://rxjs.dev/api/index/function/timer) + +#### concatWith + +- Similar to [RxJS concatWith](https://rxjs.dev/api/operators/concatWith) +- Similar + to [RxJava concatWith](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#concatWith-org.reactivestreams.Publisher-) + +#### startWith + +- Similar to [RxJS startWith](https://rxjs.dev/api/operators/startWith) +- Similar + to [RxJava startWith](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#startWithItem-T-) + +#### flatMapFirst / exhaustMap + +- Similar to [RxJS exhaustMap](https://rxjs.dev/api/operators/exhaustMap) +- Similar + to [RxSwift flatMapFirst](https://github.com/ReactiveX/RxSwift/blob/b48f2e9536cd985d912126709b97bd743e58c8fc/RxSwift/Observables/Merge.swift#L37) + +#### flattenFirst / exhaustAll + +- Similar to [RxJS exhaustAll](https://rxjs.dev/api/operators/exhaustAll) + +#### mapTo + +- Similar to [RxJS mapTo](https://rxjs.dev/api/operators/mapTo)) + +#### materialize + +- Similar to [RxJS materialize](https://rxjs.dev/api/operators/materialize) +- Similar + to [RxJava materialize](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#materialize--) + +#### dematerialize + +- Similar to [RxJS dematerialize](https://rxjs.dev/api/operators/dematerialize) +- Similar + to [RxJava dematerialize](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html#dematerialize--) + +#### takeUntil + +- ReactiveX docs: http://reactivex.io/documentation/operators/takeuntil.html +- Similar to [RxJS takeUntil](https://rxjs.dev/api/operators/takeUntil) + +#### withLatestFrom + +- RxMarbles: https://rxmarbles.com/#withLatestFrom +- Similar to [RxJS withLatestFrom](https://rxjs.dev/api/operators/withLatestFrom) ... and more, please check out [Docs 0.x](https://hoc081098.github.io/FlowExt/docs/0.x)/[Docs snapshot](https://hoc081098.github.io/FlowExt/docs/latest). From 086f934ee2afdf94cb330c23830531f751815420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petrus=20Nguy=E1=BB=85n=20Th=C3=A1i=20H=E1=BB=8Dc?= Date: Fri, 18 Mar 2022 13:16:12 +0700 Subject: [PATCH 3/3] docs: readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b35d14b..f320463a 100644 --- a/README.md +++ b/README.md @@ -215,7 +215,7 @@ dependencies { ```License MIT License -Copyright (c) 2021 Petrus Nguyễn Thái Học +Copyright (c) 2021-2022 Petrus Nguyễn Thái Học ``` [badge-android]: http://img.shields.io/badge/platform-android-6EDB8D.svg?style=flat