mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-19 23:05:04 +01:00
18 lines
422 B
JavaScript
18 lines
422 B
JavaScript
import rxjs from "../../lib/rx.js";
|
|
|
|
const currentBackend$ = new rxjs.ReplaySubject(1);
|
|
|
|
export function setCurrentBackend(n) {
|
|
currentBackend$.next(n);
|
|
}
|
|
|
|
export function getCurrentBackend() {
|
|
return currentBackend$.asObservable();
|
|
}
|
|
|
|
export function getURLParams() {
|
|
return [...new URLSearchParams(location.search)].reduce((acc, [key, value]) => {
|
|
acc[key] = value;
|
|
return acc;
|
|
}, {});
|
|
}
|