Filtering Operators
Filter streams with filter, debounceTime, distinctUntilChanged.
What filtering operators do
Filtering operators decide which emitted values pass through and which are dropped, or how often values are allowed. They are essential for clean, efficient streams.
filter
filter emits only values that pass a predicate — like Array.filter over time.
import { of, filter } from 'rxjs';
of(1, 2, 3, 4).pipe(
filter(n => n % 2 === 0)
).subscribe(v => console.log(v)); // 2, 4All lessons in this course
- Transformation Operators
- Filtering Operators
- Combination Operators
- Error Handling Operators