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

Function safeSetString

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

Source from the content-addressed store, hash-verified

61}
62
63export function safeSetString(key: string, value: string): void {
64 try {
65 globalThis.localStorage.setItem(key, value);
66 } catch {
67 // storage unavailable (private mode, quota, etc.) — ignore
68 }
69}
70
71export function safeRemove(key: string): void {
72 try {

Callers 15

setLocaleFunction · 0.90
getClientIdFunction · 0.90
saveDraftFunction · 0.90
saveSidebarCollapsedFunction · 0.90
writeStoredFunction · 0.90
savePermissionToStorageFunction · 0.90
saveThinkingToStorageFunction · 0.90
saveModeMapToStorageFunction · 0.90

Calls 1

setItemMethod · 0.65

Tested by

no test coverage detected