{"ScriptPreparationCode":null,"TestCases":[{"Name":"lodash merge","Code":"var a = {\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022color\u0022: \u0022#C8C6C4\u0022,\r\n \u0022borderWidth\u0022: \u00222px\u0022,\r\n \u0022borderStyle\u0022: \u0022solid\u0022,\r\n \u0022borderColor\u0022: \u0022transparent\u0022,\r\n \u0022borderRadius\u0022: \u002250%\u0022,\r\n \u0022height\u0022: \u00223.2rem\u0022,\r\n \u0022minWidth\u0022: \u00223.2rem\u0022,\r\n \u0022padding\u0022: \u00220\u0022,\r\n \u0022cursor\u0022: \u0022pointer\u0022,\r\n \u0022:focus\u0022: {\r\n \u0022outline\u0022: 0,\r\n \u0022bla\u0022: true,\r\n \u0022blaaaa\u0022: true\r\n },\r\n \u0022:hover\u0022: {\r\n \u0022color\u0022: \u0022#A6A7DC\u0022,\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022\u0026 .ui-icon__filled\u0022: {\r\n \u0022display\u0022: \u0022block\u0022\r\n },\r\n \u0022\u0026 .ui-icon__outline\u0022: {\r\n \u0022display\u0022: \u0022none\u0022\r\n }\r\n },\r\n \u0022:focus-visible\u0022: {\r\n \u0022color\u0022: \u0022#A6A7DC\u0022,\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022borderColor\u0022: \u0022#A6A7DC\u0022,\r\n \u0022\u0026 .ui-icon__filled\u0022: {\r\n \u0022display\u0022: \u0022block\u0022\r\n },\r\n \u0022\u0026 .ui-icon__outline\u0022: {\r\n \u0022display\u0022: \u0022none\u0022\r\n }\r\n }\r\n};\r\nvar b = {\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022borderWidth\u0022: \u00222px\u0022,\r\n \u0022borderStyle\u0022: \u0022solid\u0022,\r\n \u0022borderColor\u0022: \u0022transparent\u0022,\r\n \u0022borderRadius\u0022: \u002250%\u0022,\r\n \u0022height\u0022: \u00223.2rem\u0022,\r\n \u0022minWidth\u0022: \u00223.2rem\u0022,\r\n \u0022padding\u0022: \u00220\u0022,\r\n \u0022color\u0022: \u0022#C8C6C4\u0022,\r\n \u0022cursor\u0022: \u0022pointer\u0022,\r\n \u0022:focus\u0022: {\r\n \u0022outline\u0022: 0,\r\n \u0022blaaaa\u0022: true\r\n },\r\n \u0022:hover\u0022: {\r\n \u0022color\u0022: \u0022#A6A7DC\u0022,\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022\u0026 .ui-icon__filled\u0022: {\r\n \u0022display\u0022: \u0022block\u0022\r\n },\r\n \u0022\u0026 .ui-icon__outline\u0022: {\r\n \u0022display\u0022: \u0022none\u0022\r\n }\r\n },\r\n \u0022:focus-visible\u0022: {\r\n \u0022color\u0022: \u0022#A6A7DC\u0022,\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022borderColor\u0022: \u0022#A6A7DC\u0022,\r\n \u0022\u0026 .ui-icon__filled\u0022: {\r\n \u0022display\u0022: \u0022block\u0022\r\n },\r\n \u0022\u0026 .ui-icon__outline\u0022: {\r\n \u0022display\u0022: \u0022none\u0022\r\n }\r\n }\r\n};\r\nvar c = _.merge(a, b);","IsDeferred":false},{"Name":"object.assign","Code":"var a = {\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022color\u0022: \u0022#C8C6C4\u0022,\r\n \u0022borderWidth\u0022: \u00222px\u0022,\r\n \u0022borderStyle\u0022: \u0022solid\u0022,\r\n \u0022borderColor\u0022: \u0022transparent\u0022,\r\n \u0022borderRadius\u0022: \u002250%\u0022,\r\n \u0022height\u0022: \u00223.2rem\u0022,\r\n \u0022minWidth\u0022: \u00223.2rem\u0022,\r\n \u0022padding\u0022: \u00220\u0022,\r\n \u0022cursor\u0022: \u0022pointer\u0022,\r\n \u0022:focus\u0022: {\r\n \u0022outline\u0022: 0,\r\n \u0022bla\u0022: true,\r\n \u0022blaaaa\u0022: true\r\n },\r\n \u0022:hover\u0022: {\r\n \u0022color\u0022: \u0022#A6A7DC\u0022,\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022\u0026 .ui-icon__filled\u0022: {\r\n \u0022display\u0022: \u0022block\u0022\r\n },\r\n \u0022\u0026 .ui-icon__outline\u0022: {\r\n \u0022display\u0022: \u0022none\u0022\r\n }\r\n },\r\n \u0022:focus-visible\u0022: {\r\n \u0022color\u0022: \u0022#A6A7DC\u0022,\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022borderColor\u0022: \u0022#A6A7DC\u0022,\r\n \u0022\u0026 .ui-icon__filled\u0022: {\r\n \u0022display\u0022: \u0022block\u0022\r\n },\r\n \u0022\u0026 .ui-icon__outline\u0022: {\r\n \u0022display\u0022: \u0022none\u0022\r\n }\r\n }\r\n};\r\nvar b = {\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022borderWidth\u0022: \u00222px\u0022,\r\n \u0022borderStyle\u0022: \u0022solid\u0022,\r\n \u0022borderColor\u0022: \u0022transparent\u0022,\r\n \u0022borderRadius\u0022: \u002250%\u0022,\r\n \u0022height\u0022: \u00223.2rem\u0022,\r\n \u0022minWidth\u0022: \u00223.2rem\u0022,\r\n \u0022padding\u0022: \u00220\u0022,\r\n \u0022color\u0022: \u0022#C8C6C4\u0022,\r\n \u0022cursor\u0022: \u0022pointer\u0022,\r\n \u0022:focus\u0022: {\r\n \u0022outline\u0022: 0,\r\n \u0022blaaaa\u0022: true\r\n },\r\n \u0022:hover\u0022: {\r\n \u0022color\u0022: \u0022#A6A7DC\u0022,\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022\u0026 .ui-icon__filled\u0022: {\r\n \u0022display\u0022: \u0022block\u0022\r\n },\r\n \u0022\u0026 .ui-icon__outline\u0022: {\r\n \u0022display\u0022: \u0022none\u0022\r\n }\r\n },\r\n \u0022:focus-visible\u0022: {\r\n \u0022color\u0022: \u0022#A6A7DC\u0022,\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022borderColor\u0022: \u0022#A6A7DC\u0022,\r\n \u0022\u0026 .ui-icon__filled\u0022: {\r\n \u0022display\u0022: \u0022block\u0022\r\n },\r\n \u0022\u0026 .ui-icon__outline\u0022: {\r\n \u0022display\u0022: \u0022none\u0022\r\n }\r\n }\r\n};\r\nvar c = deepmerge(a, b);","IsDeferred":false},{"Name":"spread","Code":"var a = {\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022color\u0022: \u0022#C8C6C4\u0022,\r\n \u0022borderWidth\u0022: \u00222px\u0022,\r\n \u0022borderStyle\u0022: \u0022solid\u0022,\r\n \u0022borderColor\u0022: \u0022transparent\u0022,\r\n \u0022borderRadius\u0022: \u002250%\u0022,\r\n \u0022height\u0022: \u00223.2rem\u0022,\r\n \u0022minWidth\u0022: \u00223.2rem\u0022,\r\n \u0022padding\u0022: \u00220\u0022,\r\n \u0022cursor\u0022: \u0022pointer\u0022,\r\n \u0022:focus\u0022: {\r\n \u0022outline\u0022: 0,\r\n \u0022bla\u0022: true,\r\n \u0022blaaaa\u0022: true\r\n },\r\n \u0022:hover\u0022: {\r\n \u0022color\u0022: \u0022#A6A7DC\u0022,\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022\u0026 .ui-icon__filled\u0022: {\r\n \u0022display\u0022: \u0022block\u0022\r\n },\r\n \u0022\u0026 .ui-icon__outline\u0022: {\r\n \u0022display\u0022: \u0022none\u0022\r\n }\r\n },\r\n \u0022:focus-visible\u0022: {\r\n \u0022color\u0022: \u0022#A6A7DC\u0022,\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022borderColor\u0022: \u0022#A6A7DC\u0022,\r\n \u0022\u0026 .ui-icon__filled\u0022: {\r\n \u0022display\u0022: \u0022block\u0022\r\n },\r\n \u0022\u0026 .ui-icon__outline\u0022: {\r\n \u0022display\u0022: \u0022none\u0022\r\n }\r\n }\r\n};\r\nvar b = {\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022borderWidth\u0022: \u00222px\u0022,\r\n \u0022borderStyle\u0022: \u0022solid\u0022,\r\n \u0022borderColor\u0022: \u0022transparent\u0022,\r\n \u0022borderRadius\u0022: \u002250%\u0022,\r\n \u0022height\u0022: \u00223.2rem\u0022,\r\n \u0022minWidth\u0022: \u00223.2rem\u0022,\r\n \u0022padding\u0022: \u00220\u0022,\r\n \u0022color\u0022: \u0022#C8C6C4\u0022,\r\n \u0022cursor\u0022: \u0022pointer\u0022,\r\n \u0022:focus\u0022: {\r\n \u0022outline\u0022: 0,\r\n \u0022blaaaa\u0022: true\r\n },\r\n \u0022:hover\u0022: {\r\n \u0022color\u0022: \u0022#A6A7DC\u0022,\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022\u0026 .ui-icon__filled\u0022: {\r\n \u0022display\u0022: \u0022block\u0022\r\n },\r\n \u0022\u0026 .ui-icon__outline\u0022: {\r\n \u0022display\u0022: \u0022none\u0022\r\n }\r\n },\r\n \u0022:focus-visible\u0022: {\r\n \u0022color\u0022: \u0022#A6A7DC\u0022,\r\n \u0022backgroundColor\u0022: \u0022transparent\u0022,\r\n \u0022borderColor\u0022: \u0022#A6A7DC\u0022,\r\n \u0022\u0026 .ui-icon__filled\u0022: {\r\n \u0022display\u0022: \u0022block\u0022\r\n },\r\n \u0022\u0026 .ui-icon__outline\u0022: {\r\n \u0022display\u0022: \u0022none\u0022\r\n }\r\n }\r\n};\r\n/**\r\n * Simple object check.\r\n * @param item\r\n * @returns {boolean}\r\n */\r\nfunction isObject(item) {\r\n return (item \u0026\u0026 typeof item === \u0027object\u0027 \u0026\u0026 !Array.isArray(item));\r\n}\r\n\r\n/**\r\n * Deep merge two objects.\r\n * @param target\r\n * @param ...sources\r\n */\r\nfunction mergeDeep(target, ...sources) {\r\n if (!sources.length) return target;\r\n const source = sources.shift();\r\n\r\n if (isObject(target) \u0026\u0026 isObject(source)) {\r\n for (const key in source) {\r\n if (isObject(source[key])) {\r\n if (!target[key]) Object.assign(target, { [key]: {} });\r\n mergeDeep(target[key], source[key]);\r\n } else {\r\n Object.assign(target, { [key]: source[key] });\r\n }\r\n }\r\n }\r\n\r\n return mergeDeep(target, ...sources);\r\n}\r\nvar c = mergeDeep({}, a, b);","IsDeferred":false}]}