Demo:  distinct

distinct emits only the distinct values from the source observable.

distinct()
//Each item is delayed by 1sec to avoid display overlap
let input = of(2,5,6,5,5,6,6,3,8)
       .pipe(concatMap(v=>of(v).pipe(delay(1000))));

//Emits only the distinct values
let process = distinct();

let output = input.pipe(process).subscribe(v=>console.log(v))