Last active
May 1, 2019 14:54
-
-
Save kosich/701c9bfc4497701321bc85b936b5f193 to your computer and use it in GitHub Desktop.
ignoreElements with concat #rxjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { rxObserver } = require('api/v0.3'); | |
const { timer, of, concat } = require('rxjs'); | |
const { take, ignoreElements } = require('rxjs/operators'); | |
const source$ = timer(10, 5).pipe(take(4)); | |
const result$ = concat( | |
source$.pipe(ignoreElements()), | |
of(true) | |
); | |
source$.subscribe(rxObserver('source$')); | |
result$.subscribe(rxObserver('concat( source$ :: ignoreElements() , of(true) )')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment