How to use the finalize function from rxjs
Find comprehensive JavaScript rxjs.finalize code examples handpicked from public code repositorys.
GitHub: openforis/sepal
43 44 45 46 47 48 49 50 51 52
limiter$: (observable$, id = uuid(), username) => { const stop$ = new Subject() return service.submit$(limiterService, {id, username: username || 'ANON'}).pipe( takeUntil(stop$), mergeMap(() => observable$.pipe( finalize(() => stop$.next()) )) ) } }
45
178
34
GitHub: openforis/sepal
111 112 113 114 115 116 117 118 119 120
getInstance$().pipe( switchMap(instance => concat(of(instance), NEVER).pipe( tap(instance => lock(instance)), map(({item}) => item), finalize(() => release(instance)) ) ) ) }
45
178
34
GitHub: openforis/sepal
217 218 219 220 221 222 223 224 225 226
) } return from(init()).pipe( switchMap(() => out$.pipe( finalize( () => stop$.next() ) )) )
45
177
0