MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / clampSetting

Function clampSetting

graph-ui/src/lib/density.ts:105–110  ·  view source on GitHub ↗
(key: keyof DisplaySettings, value: unknown)

Source from the content-addressed store, hash-verified

103const DISPLAY_STORAGE_KEY = "cbm-display";
104
105function clampSetting(key: keyof DisplaySettings, value: unknown): number {
106 const { min, max } = DISPLAY_LIMITS[key];
107 const n = typeof value === "number" ? value : Number.NaN;
108 if (!Number.isFinite(n)) return DEFAULT_DISPLAY_SETTINGS[key];
109 return Math.min(max, Math.max(min, n));
110}
111
112export function clampDisplaySettings(
113 raw: Partial<DisplaySettings>,

Callers 1

clampDisplaySettingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected