MCPcopy
hub / github.com/vpulim/node-soap / mergeWith

Function mergeWith

src/utils.ts:29–42  ·  view source on GitHub ↗
(target: T, ...args: any[])

Source from the content-addressed store, hash-verified

27}
28
29export function mergeWith<T>(target: T, ...args: any[]): T {
30 const customizer: ((a: any, b: any, key: string) => any) | undefined = args.pop();
31 const sources: any[] = args;
32
33 for (const source of sources) {
34 if (source == null) {
35 continue;
36 }
37 for (const key of Object.keys(source)) {
38 baseMergeValue(target as any, source, key, customizer);
39 }
40 }
41 return target;
42}
43
44function baseMergeValue(target: Record<string, any>, source: Record<string, any>, key: string, customizer?: (a: any, b: any, key: string) => any): void {
45 const srcValue = source[key];

Callers 2

_processNextIncludeMethod · 0.90
mergeFunction · 0.85

Calls 1

baseMergeValueFunction · 0.85

Tested by

no test coverage detected