MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / safeSetJson

Function safeSetJson

apps/kimi-web/src/lib/storage.ts:89–95  ·  view source on GitHub ↗
(key: string, value: unknown)

Source from the content-addressed store, hash-verified

87}
88
89export function safeSetJson(key: string, value: unknown): void {
90 try {
91 globalThis.localStorage.setItem(key, JSON.stringify(value));
92 } catch {
93 // ignore
94 }
95}
96
97/**
98 * Per-session unread flags: a session id is "unread" when its value is `true`.

Callers 7

loadMapFunction · 0.90
pushFunction · 0.90
saveCollapsedWorkspacesFunction · 0.85
saveShowWorkspacePathsFunction · 0.85
saveWorkspaceOrderFunction · 0.85

Calls 1

setItemMethod · 0.65

Tested by

no test coverage detected