How to use the filter function from rxjs
Find comprehensive JavaScript rxjs.filter code examples handpicked from public code repositorys.
GitHub: openforis/sepal
16 17 18 19 20 21 22 23 24
return execute$( 'python3', 'get band names', [`${__dirname}/gdal/get_band_names.py`, path] ).pipe( filter(({stream}) => stream === 'stdout'), map(({value}) => JSON.parse(value)) ) })
45
180
34
GitHub: openforis/sepal
31 32 33 34 35 36 37 38 39 40
unlock$.pipe( tap(instance => instance.locked = false), mergeMap(instance => timer(maxIdleMilliseconds).pipe( takeUntil(lock$.pipe( filter(currentInstance => currentInstance === instance) )), map(() => instance) ) )
45
178
34
GitHub: openforis/sepal
16 17 18 19 20 21 22 23 24 25 26
}) const apps$ = () => fileToJson$('/var/lib/sepal/app-manager/apps.json').pipe( switchMap(({apps}) => from(apps)), filter(({repository}) => repository), map(({endpoint = 'shiny', label, repository, branch}) => { const name = basename(repository) return { endpoint,
45
177
0
GitHub: openforis/sepal
90 91 92 93 94 95 96 97 98 99 100
task$.pipe( mergeMap(task => { const taskCancellation$ = merge( cancel$.pipe( filter(id => id === task.id), tap(() => log.debug(msg(task.id, 'cancelled by user'))), ), switchedToServiceAccount$.pipe( tap(() => log.debug(msg(task.id, 'cancelled by switching to service account'))),
45
177
0
59 60 61 62 63 64 65 66 67 68
ctx.response.status = 200; listener.open().then(() => { console.log('listener open'); listener.confirmed(bot.address).pipe( op.filter(tx => { console.log(tx); return tx.transactionInfo !== undefined && tx.transactionInfo.hash === signedLockTx.hash; }), op.delay(5000),
5
5
3
32 33 34 35 36 37 38 39 40 41
} statistics.collectExperimentMetadata(parameters) const experiment = { busStops: regions.pipe( filter((region) => region.stops), mergeMap((region) => region.stops) ), lineShapes: regions.pipe( filter((region) => region.lineShapes),
1
16
0
+ 8 other calls in file
73 74 75 76 77 78 79 80 81 82
delayWhen((_) => timer(RECONNECT_INTERVAL)) ), }) ); const binance = subjectBinance.pipe( filter((y) => y.s.slice(0, -4) === x), map((z) => ({ market: z.s, price: Number(z.c) })), repeat({ delay: (x) => of(x).pipe(
2
0
0
+ 3 other calls in file
GitHub: Dev-BestOW/rxjs
18 19 20 21 22 23 24 25 26 27 28 29
}) range(10, 3) .pipe( // filter(n => n % 2 === 0), // take(5), ) .subscribe(console.log)
0
0
1
+ 3 other calls in file