* Normalize value for consistent JSON.stringify behavior. * Converts undefined to null for consistent serialization.
(value: unknown)
| 3093 | * Converts undefined to null for consistent serialization. |
| 3094 | */ |
| 3095 | #normalizeValue(value: unknown): unknown { |
| 3096 | if (value === undefined) { |
| 3097 | return null; |
| 3098 | } |
| 3099 | return value; |
| 3100 | } |
| 3101 | |
| 3102 | /** |
| 3103 | * Safely stringify a value, handling circular references and other edge cases. |