Filtering Operators
Filtering Operators
- Filtering operators filter emissions from the source observable
The filter Operator
The take Operator
The first and last Operators
- Either takes the first value or the last value
- Can accept a predicate function
The debounceTime Operator
- Debounces the observable for a specified amount of time
- Essentially, when an item is emitted, it waits
n-milliseconds for another item to emit
- If no other item gets emitted, then the item passes through
- If an item gets emitted within the
n-milliseconds window, the timer restarts
The throttleTime Operator
- Similar to the
debounceTime operator
- Only lets one item be emitted for each
n-millisecond window
The distinctUntilChanged Operator
- Discards new notifications if they match the previous notification
- Uses referential equality by default but can be supplied with a custom comparer function