An overview of important operators in RxJS
- take(): Emits only the number of values specified
- distinct(): distini
- distinctUntilChanged:
- skip(): skip the number of values specified
- takeLast(): Put only a certain number
- tap(): Doesn’t do anything to the data, but useful for debugging. It can be used to run side effects like console logs
filter:
fruits.pipe(
filter(fruit => fruit === "banana" || fruit === "apple")
).subscribe(fruit => toConveyorBelt(fruit));
map:
fruits.pipe(
map(fruit => fruit.replace("dirty-", ""))
).subscribe(fruit => toConveyorBelt(fruit));