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

Function safeWriteJSON

frontend/src/views/sql-editor/Sheet/context.ts:256–263  ·  view source on GitHub ↗
(key: string, value: unknown)

Source from the content-addressed store, hash-verified

254};
255
256const safeWriteJSON = (key: string, value: unknown) => {
257 if (typeof window === "undefined") return;
258 try {
259 window.localStorage.setItem(key, JSON.stringify(value));
260 } catch {
261 // Ignore quota / serialization errors.
262 }
263};
264
265const currentScope = (): {
266 wsScope: string;

Callers 3

persistFilterFunction · 0.85
persistExpandedKeysFunction · 0.85
persistViewFoldersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected