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

Function safeRemove

apps/kimi-web/src/lib/storage.ts:71–77  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

69}
70
71export function safeRemove(key: string): void {
72 try {
73 globalThis.localStorage.removeItem(key);
74 } catch {
75 // ignore
76 }
77}
78
79export function safeGetJson<T>(key: string): T | null {
80 const raw = safeGetString(key);

Callers 5

saveDraftFunction · 0.90
applyWorkspaceEventFunction · 0.90
deleteWorkspaceFunction · 0.90

Calls 1

removeItemMethod · 0.65

Tested by

no test coverage detected