MCPcopy Create free account
hub / github.com/TanStack/devtools / saveConfig

Function saveConfig

packages/devtools-a11y/src/core/utils/config.utils.ts:43–55  ·  view source on GitHub ↗
(config: Partial<A11yPluginOptions>)

Source from the content-addressed store, hash-verified

41 * Save configuration to localStorage
42 */
43export function saveConfig(config: Partial<A11yPluginOptions>): void {
44 if (typeof localStorage === 'undefined') {
45 return
46 }
47
48 try {
49 const current = loadConfig()
50 const updated = { ...current, ...config }
51 localStorage.setItem(STORAGE_KEY, JSON.stringify(updated))
52 } catch (error) {
53 console.warn('[A11y Config] Failed to save config to localStorage:', error)
54 }
55}
56
57/**
58 * Merge user options with defaults

Callers 2

createAllyValueFunction · 0.90
config.test.tsFile · 0.90

Calls 1

loadConfigFunction · 0.85

Tested by

no test coverage detected