@ngbs/rxjs
v0.0.3
Published
Utilities to assist with the usage of RxJS
Downloads
1
Readme
@ngbs/rxjs
A collection of RxJS utilities.
Operators
mapArrayFilter
Filter an array in an Observable.
of([1, 2, 3, 4])
.pipe(mapArrayFilter(x => x % 2 === 0))
.subscribe(console.log);
// [ 2, 4 ]
mapArrayMap
Map an array in an Observable.
of([1, 2, 3, 4])
.pipe(mapArrayMap(x => x * 2))
.subscribe(console.log);
// [ 2, 4, 6, 8 ]
mapArrayReduce
Reduce an array in an Observable.
of([1, 2, 3, 4])
.pipe(mapArrayReduce((acc, cur) => acc + cur, 0))
.subscribe(console.log);
// 10
mapArrayReverse
Reverses an array in an Observable.
of([1, 2, 3, 4, 5])
.pipe(mapArrayReverse())
.subscribe(console.log);
// [5, 4, 3, 2, 1]