0.0.3 • Published 5 years ago

@ngbs/rxjs v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@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]
0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago