Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

do and tap operator rxjs

const source = of(1, 2, 3, 4);
source.pipe(
  tap(val => console.log('I am tap: ',val)),
  filter(val =>  val > 2),
  map(val => val + 1)).subscribe((val) => {
  console.log('I am subscriber value after filtering: ', val);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #tap #operator #rxjs
ADD COMMENT
Topic
Name
6+4 =