import type { KnownConfigKey } from "./registry"; const TRIMMABLE_GLOBAL_CONFIG_KEYS = [ "siteName", "smtpHost", "smtpUser", "smtpPass", "smtpFrom", ] as const; export function normalizeGlobalConfigValue(key: K, value: unknown): unknown { if (typeof value !== "string") { return value; } if ((TRIMMABLE_GLOBAL_CONFIG_KEYS as readonly string[]).includes(key)) { return value.trim(); } return value; }