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

Add rxjs7 aliases #29

Merged
merged 1 commit into from
Apr 19, 2022
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ The available operators so far are the following:

Operator | Description |
--- | --- |
[`flatMap`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#flatmap) | RxJS's mergeMap alias |
[`flatMap` / `mergeMap`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#flatmap) | RxJS's mergeMap alias |
[`zipMap`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#zipmap) | To zip the transformed value with the original value |
[`flatZipMap`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#flatzipmap) | Similar to [zipMap](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#zipmap), but to be used when a transformation returns an observable |
[`flatZipMap` / `mergeZipMap`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#flatzipmap) | Similar to [zipMap](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#zipmap), but to be used when a transformation returns an observable |
[`projectToFormer`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#projecttoformer) | To project an observable of pairs, to get the first coordinate |
[`projectToLatter`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#projecttolatter) | To project an observable of pairs, to get the second coordinate |
[`projectTo`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#projectto) | To project an observable of tuples |
[`mapFormer`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#mapformer) | To transform the first coordinate of an observable of pairs |
[`mapLatter`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#maplatter) | To transform the second coordinate of an observable of pairs |
[`flatMapFormer`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#flatmapformer) | Similar to [mapFormer](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#mapformer), but to work on stream-returning transformations |
[`flatMapLatter`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#flatmaplatter) | Similar to [mapLatter](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#maplatter), but to work on stream-returning transformations |
[`flatMapFormer` / `mergeMapFormer`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#flatmapformer) | Similar to [mapFormer](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#mapformer), but to work on stream-returning transformations |
[`flatMapLatter` / `mergeMapLatter`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#flatmaplatter) | Similar to [mapLatter](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#maplatter), but to work on stream-returning transformations |
[`listMap`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#listmap) | To transform an observable of list, with a mapping on the list elements |
[`flatListMap`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#flatlistmap) | To transform an observable of list, with a stream-returning member transformation |
[`flatListMap` / `mergeListMap`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#flatlistmap) | To transform an observable of list, with a stream-returning member transformation |
[`listFlatMap`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#listflatmap) | To transform an observable of list, with a list-returning member transformation |
[`flatListFlatMap`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#flatlistflatmap) | To transform an observable of list, with a list-observable-returning transformation|
[`flatListFlatMap` / `mergeListFlatMap`](https://github.com/rxjsx/rxjsx/tree/master/docs/operators#flatlistflatmap) | To transform an observable of list, with a list-observable-returning transformation|

## :muscle: Thanks to all Contributors
[![List of Contributors](https://contrib.rocks/image?repo=rxjsx/rxjsx)](https://github.com/rxjsx/rxjsx/graphs/contributors)
Expand Down
24 changes: 12 additions & 12 deletions docs/operators/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@

The available operators so far are the following:

- [flatMap](#flatmap)
- [flatMap / mergeMap](#flatmap--mergeMap)
- [zipMap](#zipmap)
- [flatZipMap](#flatzipmap)
- [flatZipMap / mergeZipMap](#flatzipmap--mergezipmap)
- [projectToFormer](#projecttoformer)
- [projectToLatter](#projecttolatter)
- [projectTo](#projectto)
- [mapFormer](#mapformer)
- [mapLatter](#maplatter)
- [flatMapFormer](#flatmapformer)
- [flatMapLatter](#flatmaplatter)
- [flatMapFormer / mergeMapFormer](#flatmapformer--mergemapformer)
- [flatMapLatter / mergeMapLatter](#flatmaplatter--mergemaplatter)
- [listMap](#listmap)
- [flatListMap](#flatlistmap)
- [flatListMap/ mergeListMap](#flatlistmap--mergelistmap)
- [listFlatMap](#listflatmap)
- [flatListFlatMap](#flatlistflatmap)
- [flatListFlatMap / mergeListFlatMap](#flatlistflatmap--mergelistflatmap)

### flatMap
### flatMap / mergeMap

An alias of RxJS's `mergeMap`. Just to get rid of the deprecation warning.

Expand Down Expand Up @@ -52,7 +52,7 @@ of(1, 2, 3)
.subscribe(s => console.log(nummericalVal, s));
```

### flatZipMap
### flatZipMap / mergeZipMap

![flatZipMap](marbles/png/flatZipMap.png)

Expand Down Expand Up @@ -143,7 +143,7 @@ of<[number, string]>([1, '1'], [2, '2'])
.subscribe(console.log);
```

### flatMapFormer
### flatMapFormer / mergeMapFormer

![flatMapFormer](marbles/png/flatMapFormer.png)

Expand All @@ -158,7 +158,7 @@ of<[number, string]>([1, '1'], [2, '2'])
.subscribe(console.log);
```

### flatMapLatter
### flatMapLatter / mergeMapLatter

![flatMapLatter](marbles/png/flatMapLatter.png)

Expand Down Expand Up @@ -188,7 +188,7 @@ of([1, 2, 3])
.subscribe(console.log); // [2, 4, 6]
```

### flatListMap
### flatListMap / mergeListMap

![flatListMap](marbles/png/flatListMap.png)

Expand Down Expand Up @@ -218,7 +218,7 @@ of([1, 2, 3])
.subscribe(console.log); // [1, 2, 2, 4, 3, 6]
```

### flatListFlatMap
### flatListFlatMap / mergeListFlatMap

![flatListFlatMap](marbles/png/flatListFlatMap.png)

Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
// Operators
export { flatMap } from './operators/flatMap';
export { flatMap as mergeMap } from './operators/flatMap';
export { flatMapFormer, flatMapLatter } from './operators/flatMapCoordinate';
export { flatMapFormer as mergeMapFormer, flatMapLatter as mergeMapLatter } from './operators/flatMapCoordinate';
export { flatZipMap } from './operators/flatZipMap';
export { flatZipMap as mergeZipMap } from './operators/flatZipMap';
export { listMap, flatListMap, listFlatMap, flatListFlatMap } from './operators/listMap';
export { flatListMap as mergeListMap, flatListFlatMap as mergeListFlatMap } from './operators/listMap';
export { mapFormer, mapLatter } from './operators/mapCoordinate';
export { projectToFormer, projectToLatter, projectTo } from './operators/projectTo';
export { zipMap } from './operators/zipMap';