UNPKG

@grindife/supamelon

Version:

Combination of supabase and watermelondb

11 lines (7 loc) 442 B
// @flow import type { Observable } from '../__wmelonRxShim' // Equivalent to observable |> distinctUntilChanged |> publishReplayLatestWhileConnected |> refCount // // Creates an observable that shares the connection with and replays the latest value from the underlying // observable, and skips emissions that are the same as the previous one export default function cacheWhileConnected<T>(source: Observable<T>): Observable<T>