📜  rxjs mapto vs tap - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:06.102000             🧑  作者: Mango

代码示例2
const source$ = of(1,2,3) // observable which will emit 1,2,3
// It take an input observable and return a same observable after console value.
// So, the output observable will emit 1,2,3
const tapSource$ = of(1,2,3)
                    .pipe(tap(value => console.log(value)))