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

Function normalizePanelWidths

packages/app-core/src/store.ts:330–340  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

328}
329
330function normalizePanelWidths(value: unknown): PanelWidths {
331 const v = (value ?? {}) as Partial<Record<RightPanelId, unknown>>
332 const pick = (key: RightPanelId): number =>
333 typeof v[key] === 'number' ? clampPanelWidth(v[key] as number) : DEFAULT_PANEL_WIDTHS[key]
334 return {
335 outline: pick('outline'),
336 connections: pick('connections'),
337 comments: pick('comments'),
338 calendar: pick('calendar')
339 }
340}
341
342interface Prefs {
343 vimMode: boolean

Callers 1

normalizePrefsFunction · 0.85

Calls 1

pickFunction · 0.85

Tested by

no test coverage detected