MCPcopy Create free account
hub / github.com/ShivaBhattacharjee/KeyZen / load

Function load

data/javascript/10_storage.js:5–13  ·  view source on GitHub ↗
(key, fallback = null)

Source from the content-addressed store, hash-verified

3};
4
5const load = (key, fallback = null) => {
6 const raw = localStorage.getItem(key);
7 if (raw === null) return fallback;
8 try {
9 return JSON.parse(raw);
10 } catch {
11 return fallback;
12 }
13};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected