MCPcopy
hub / github.com/stemdeckapp/stemdeck / storeGet

Function storeGet

static/js/utils.js:7–18  ·  view source on GitHub ↗
(key, fallback = null)

Source from the content-addressed store, hash-verified

5// on macOS — outside WebKit's reach, so WebView resets can never destroy user data.
6
7export async function storeGet(key, fallback = null) {
8 if (window.__TAURI__?.core?.invoke) {
9 try {
10 const val = await window.__TAURI__.core.invoke("store_get", { key });
11 return val ?? fallback;
12 } catch (e) { console.warn("[store] get failed for", key, e); return fallback; }
13 }
14 try {
15 const raw = localStorage.getItem(key);
16 return raw !== null ? JSON.parse(raw) : fallback;
17 } catch (e) { console.warn("[store] localStorage get failed for", key, e); return fallback; }
18}
19
20export async function storeSet(key, value) {
21 if (window.__TAURI__?.core?.invoke) {

Callers 3

loadStateFunction · 0.90
loadMixIntoStateFunction · 0.90
state.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected