MCPcopy
hub / github.com/callstack/react-native-testing-library / mergeEventProps

Function mergeEventProps

src/fire-event.ts:214–234  ·  view source on GitHub ↗
(target: Record<string, unknown>, source: Record<string, unknown>)

Source from the content-addressed store, hash-verified

212}
213
214function 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}

Callers 1

fire-event.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…