How to use the distinctUntilChanged function from rxjs
Find comprehensive JavaScript rxjs.distinctUntilChanged code examples handpicked from public code repositorys.
GitHub: openforis/sepal
48 49 50 51 52 53 54 55 56
switchMap(({state, error_message: error}) => (error || state === FAILED) ? throwError(() => new Error(error)) : of(state) ), distinctUntilChanged(), takeWhile(state => isRunning(state)), map(toProgress) )
45
178
34
GitHub: openforis/sepal
54 55 56 57 58 59 60 61 62 63
defaultMessage: 'Completed!', messageKey: 'tasks.status.completed' } const progressState$ = task.submit$(id, params).pipe( distinctUntilChanged((p1, p2) => _.isEqual( _.pick(p1, ['defaultMessage', 'messageKey', 'messageArgs']), _.pick(p2, ['defaultMessage', 'messageKey', 'messageArgs']) )), map(progress => {
45
178
34
GitHub: openforis/sepal
57 58 59 60 61 62 63 64 65 66
trigger$.pipe( switchMap(trigger => concat(triggerAction$(trigger), poll$) ), exhaustMap(() => from(scanDirs())), distinctUntilChanged(_.isEqual), takeUntil(stop$), catchError(error => { log.error(error) })
45
177
0