RXJS Demo
        
const source = new Subject<number>();
const observable = source.pipe(
  filter(value => value % 2 === 0),
  map(value => value * 2),
  take(2)
);


source.next(1); // filtered out
source.next(2); // mapped and emitted
source.next(3); // filtered out
source.next(4); // mapped and emitted
source.next(5); // no more emissions
        
      

Value of source using async pipe:

null

Value of observable using async pipe:

null