Skip to content

Instantly share code, notes, and snippets.

@kosich
Last active May 1, 2019 14:54
Show Gist options
  • Save kosich/701c9bfc4497701321bc85b936b5f193 to your computer and use it in GitHub Desktop.
Save kosich/701c9bfc4497701321bc85b936b5f193 to your computer and use it in GitHub Desktop.
ignoreElements with concat #rxjs
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