Prepend a stream with a value. This value will be synchronously emitted upon subscription:
NOTE: also take a look at rxjs/defaultIfEmpty/ to handle EMPTY Observables.
1234567891011121314151617const { rxObserver } = require('api/v0.3'); const { interval } = require('rxjs'); const { startWith, take } = require('rxjs/operators'); interval(10) .pipe( take(5) ) .subscribe(rxObserver('interval(10)')); interval(10) .pipe( startWith('🐶'), take(5) ) .subscribe(rxObserver('startWith(🐶)'));