MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / normalizeThemeTweaks

Function normalizeThemeTweaks

packages/app-core/src/store.ts:7505–7513  ·  view source on GitHub ↗

Keep only string→string entries (token slug → color).

(raw: unknown)

Source from the content-addressed store, hash-verified

7503
7504/** Keep only string→string entries (token slug → color). */
7505function normalizeThemeTweaks(raw: unknown): Record<string, string> {
7506 const out: Record<string, string> = {}
7507 if (raw && typeof raw === 'object' && !Array.isArray(raw)) {
7508 for (const [key, value] of Object.entries(raw as Record<string, unknown>)) {
7509 if (typeof value === 'string' && value) out[key] = value
7510 }
7511 }
7512 return out
7513}
7514
7515/** Keep only string→string entries with a `.css` key (tolerant of hand edits). */
7516function normalizeEnabledOverrides(raw: unknown): Record<string, string> {

Callers 1

normalizePrefsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected