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

Function safeWrite

frontend/src/react/stores/sqlEditor/editor.ts:49–56  ·  view source on GitHub ↗
(key: string, value: unknown)

Source from the content-addressed store, hash-verified

47};
48
49const safeWrite = (key: string, value: unknown) => {
50 if (typeof window === "undefined") return;
51 try {
52 window.localStorage.setItem(key, JSON.stringify(value));
53 } catch {
54 // Ignore quota / serialization errors.
55 }
56};
57
58// Workspace-scoped in SaaS so the last project of workspace A is never read
59// after switching to workspace B (where it doesn't exist). Reads the app store

Callers 3

setProjectFunction · 0.70
setResultRowsLimitFunction · 0.70
setRedisCommandOptionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected