mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-21 09:23:00 +00:00
feat: profile support
This commit is contained in:
10
src/lib/util/from-readable.ts
Normal file
10
src/lib/util/from-readable.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Observable } from "rxjs";
|
||||
import type { Readable } from "svelte/store";
|
||||
|
||||
export function fromReadable<T>(store: Readable<T>): Observable<T> {
|
||||
return new Observable((subscriber) =>
|
||||
store.subscribe((value) => {
|
||||
subscriber.next(value);
|
||||
}),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user