Example #1
0
 return (obs: Observable<any>) => obs
   .concatMap(value =>
     operators
     .map((op: any) => Observable
       .of(value)
       .let(op)))
   .concatMap(v => v);
    constructor(private store: Store<AppStore>) {
        const polls$: Observable<Polls> = this.store.select('polls');

        const selectedAnswer = polls$
            .concatMap((p: Polls) => p.items)
            .filter((p: Poll) => p.id === 'BREXIT')
            .concatMap((p: Poll) => p.answers)
            .filter((a: Answer) => a.isSelected);

        selectedAnswer.subscribe((a: Answer) => {
            this.hasUserVoted = Boolean(a);
        });
    }
Example #3
0
 return (obs: Observable<T>) => obs
   .concatMap(value => fn(value)
     .reduce(() => value, value));
Example #4
0
 get(stream$: Observable<{}>): Observable<{}> {
   return stream$.concatMap((dataUri: string) => this.analyze(dataUri));
 }