MCPcopy Create free account
hub / github.com/bytebase/bytebase / load

Method load

frontend/src/utils/web-storage.ts:20–28  ·  view source on GitHub ↗
(key: string, fallbackValue: T)

Source from the content-addressed store, hash-verified

18 }
19
20 load<T>(key: string, fallbackValue: T) {
21 const fullKey = `${this.keyPrefix}.${key}`;
22 try {
23 const json = localStorage.getItem(fullKey) || "";
24 return JSON.parse(json) as T;
25 } catch {
26 return fallbackValue;
27 }
28 }
29
30 remove(key: string) {
31 const fullKey = `${this.keyPrefix}.${key}`;

Callers 4

qp.min.jsFile · 0.80
loadStoredTabFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected