Skip to content

Instantly share code, notes, and snippets.

@ssougnez
Created March 11, 2021 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssougnez/fb0b11ef175c6447a72d469d35bb087d to your computer and use it in GitHub Desktop.
Save ssougnez/fb0b11ef175c6447a72d469d35bb087d to your computer and use it in GitHub Desktop.
import { interval } from 'rxjs';
import { mergeMap, take, tap } from 'rxjs/operators';
interval(1000)
.pipe(
take(3),
mergeMap(() => interval(1000).pipe(tap(() => console.log('foo'))))
)
.subscribe(() => console.log('bar'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment