MCPcopy Create free account
hub / github.com/GCWing/BitFun / loadStorage

Function loadStorage

src/apps/desktop/resources/worker_host.js:47–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47function loadStorage() {
48 try {
49 const data = fs.readFileSync(storagePath, 'utf8');
50 return JSON.parse(data);
51 } catch {
52 return {};
53 }
54}
55
56function saveStorage(obj) {
57 fs.writeFileSync(storagePath, JSON.stringify(obj, null, 2), 'utf8');

Callers 1

dispatchFunction · 0.70

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected