Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: readme #63

Merged
merged 3 commits into from
Mar 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 126 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,124 @@
![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
### 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`](#timer)
- Intermediate operators
- `bufferCount`
- [`concatWith`](#concatWith)
- [`startWith`](#startWith)
- [`flatMapFirst`](#flatMapFirst)
- [`exhaustMap`](#flatMapFirst)
- [`flattenFirst`](#flattenFirst)
- [`exhaustAll`](#flattenFirst)
- `mapIndexed`
- [`mapTo`](#mapTo)
- [`materialize`](#materialize)
- [`dematerialize`](#dematerialize)
- `retryWhenWithDelayStrategy`
- `retryWhenWithExponentialBackoff`
- `retryWithExponentialBackoff`
- [`takeUntil`](#takeUntil)
- `throttle`
- `throttleTime`
- [`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-))

#### 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)

#### 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).

## Installation

Expand All @@ -63,11 +154,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")
Expand All @@ -88,6 +181,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 {
Expand All @@ -102,6 +196,7 @@ dependencies {
```

- Groovy

```groovy
allprojects {
repositories {
Expand All @@ -115,23 +210,32 @@ dependencies {
}
```


## License

```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

[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