(target: Record<string, unknown>, source: Record<string, unknown>)
| 212 | } |
| 213 | |
| 214 | function mergeEventProps(target: Record<string, unknown>, source: Record<string, unknown>) { |
| 215 | for (const key of Object.keys(source)) { |
| 216 | const sourceValue = source[key]; |
| 217 | const targetValue = target[key]; |
| 218 | if ( |
| 219 | sourceValue != null && |
| 220 | typeof sourceValue === 'object' && |
| 221 | !Array.isArray(sourceValue) && |
| 222 | targetValue && |
| 223 | typeof targetValue === 'object' && |
| 224 | !Array.isArray(targetValue) |
| 225 | ) { |
| 226 | mergeEventProps( |
| 227 | targetValue as Record<string, unknown>, |
| 228 | sourceValue as Record<string, unknown>, |
| 229 | ); |
| 230 | } else { |
| 231 | target[key] = sourceValue; |
| 232 | } |
| 233 | } |
| 234 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…