Observable.interval(1000)
.map(() => currentValue)
.distinctUntilChanged();
Or you can specify a comparator function:
Observable.interval(1000)
.map(() => currentValue)
.distinctUntilChanged((oldValue, newValue) => <return true if equal>);
source
share