{"ScriptPreparationCode":"var fp = _.noConflict();\r\n\r\nfunction customMerge(a, b) {\r\n const result = {}\r\n for (const prop in a)\r\n if (a.hasOwnProperty(prop)) {\r\n result[prop] = b.hasOwnProperty(prop) \r\n ? a[prop].constructor === Object \r\n ? customMerge(a[prop], b[prop]) : b[prop] \r\n : a[prop]\r\n }\r\n return result\r\n}","TestCases":[{"Name":"lodash merge","Code":"var a = { a: \u0027a\u0027, b: \u0027b\u0027, c: { a: \u0027ca\u0027, b: \u0027cb\u0027 }};\r\nvar b = { a: \u0027aa\u0027, c: {b: \u0027cbb\u0027}};\r\nvar c = _.merge({}, a, b);","IsDeferred":false},{"Name":"lodash/fp merge","Code":"var a = { a: \u0027a\u0027, b: \u0027b\u0027, c: { a: \u0027ca\u0027, b: \u0027cb\u0027 }};\r\nvar b = { a: \u0027aa\u0027, c: {b: \u0027cbb\u0027}};\r\nvar c = fp.merge(b, a);","IsDeferred":false},{"Name":"custom merge","Code":"var a = { a: \u0027a\u0027, b: \u0027b\u0027, c: { a: \u0027ca\u0027, b: \u0027cb\u0027 }};\r\nvar b = { a: \u0027aa\u0027, c: {b: \u0027cbb\u0027}};\r\nvar c = customMerge(a, b)","IsDeferred":false},{"Name":"spread","Code":"var a = { a: \u0027a\u0027, b: \u0027b\u0027, c: { a: \u0027ca\u0027, b: \u0027cb\u0027 }};\r\nvar b = { a: \u0027aa\u0027, c: {b: \u0027cbb\u0027}};\r\nvar c = {\r\n ...a,\r\n ...b,\r\n c: {\r\n ...a.c,\r\n ...b.c,\r\n },\r\n}","IsDeferred":false}]}