// Schema keys are untrusted input; never write through prototype paths. const UNSAFE_KEY_SEGMENT = /(^|\.)(__proto__|constructor|prototype)(\.|$)/; export const isSafeKey = (key: string): boolean => !UNSAFE_KEY_SEGMENT.test(key);