export function isPlainRecord(value: unknown): value is Record { if (typeof value !== 'object' || value === null || Array.isArray(value)) return false const proto = Object.getPrototypeOf(value) return proto === Object.prototype || proto === null } export function hasOwn(value: T, key: PropertyKey): boolean { return Object.prototype.hasOwnProperty.call(value, key) } export function toKebab(value: string): string { return value.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`) } export function clonePlain(value: T): T { if (typeof structuredClone === 'function') return structuredClone(value) return JSON.parse(JSON.stringify(value)) as T }