take

 

take(N) will take maximum N values from source stream and will complete after that

const { rxObserver } = require('api/v0.3');
const { timer } = require('rxjs');
const { take } = require('rxjs/operators');

timer(0, 10).pipe(
    take(10)
  )
  .subscribe(rxObserver('take(10)'));

See takeUntil and takeWhile operators

And first vs take vs single comparison