{"ScriptPreparationCode":null,"TestCases":[{"Name":"helpers.merge","Code":"var a = { a: \u0027oh\u0027, b: \u0027my\u0027 };\r\nvar b = { c: \u0027goddess\u0027 };\r\nvar merge = function (a, b, options)\r\n{\r\n if (options == null) {\r\n options = {};\r\n }\r\n\r\n if (!a) {\r\n return b;\r\n }\r\n if (!b) {\r\n return a;\r\n }\r\n\r\n var deep = options.deep || false;\r\n var sum = options.sum || false;\r\n\r\n var r ={};\r\n for(var i in a ){\r\n r[i] = a[i];\r\n }\r\n for(var j in b ){\r\n if (deep \u0026\u0026 r.hasOwnProperty(j) \u0026\u0026 this.isObject(r[j]) \u0026\u0026 this.isObject(b[j])) {\r\n r[j] = this.merge(r[j], b[j], options);\r\n } else {\r\n if( sum === true ) {\r\n if( ( jpath.isNumber( r[ j ] ) === true ) \u0026\u0026 ( jpath.isNumber( b[ j ] ) === true ) ) {\r\n r[j] \u002B= b[j];\r\n }\r\n else {\r\n r[j] = b[j];\r\n }\r\n }\r\n else {\r\n r[j] = b[j];\r\n }\r\n }\r\n }\r\n return r;\r\n};\r\n\r\nvar c = merge(a, b);","IsDeferred":false},{"Name":"object.assign","Code":"var a = { a: \u0027oh\u0027, b: \u0027my\u0027 };\r\nvar b = { c: \u0027goddess\u0027 };\r\nvar c = { ...a, ...b}","IsDeferred":false},{"Name":"underscore.extend","Code":"var a = { a: \u0027oh\u0027, b: \u0027my\u0027 };\r\nvar b = { c: \u0027goddess\u0027 };\r\nvar createAssigner = function(keysFunc, undefinedOnly) {\r\n return function(obj) {\r\n var length = arguments.length;\r\n if (length \u003C 2 || obj == null) return obj;\r\n for (var index = 1; index \u003C length; index\u002B\u002B) {\r\n var source = arguments[index],\r\n keys = keysFunc(source),\r\n l = keys.length;\r\n for (var i = 0; i \u003C l; i\u002B\u002B) {\r\n var key = keys[i];\r\n if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];\r\n }\r\n }\r\n return obj;\r\n };\r\n };\r\nvar allKeys = function(obj) {\r\n if (!_.isObject(obj)) return [];\r\n var keys = [];\r\n for (var key in obj) keys.push(key);\r\n return keys;\r\n };\r\nvar extend = createAssigner(allKeys);\r\nvar c = extend(a, b);","IsDeferred":false}]}