{"ScriptPreparationCode":null,"TestCases":[{"Name":"Stringification Deep Copy","Code":"let stringyCopy = JSON.parse(JSON.stringify({\r\n \u0022name\u0022: {\r\n \u0022first\u0022: \u0022Billy\u0022,\r\n \u0022last\u0022: \u0022Bob\u0022,\r\n \u0022middle\u0022: \u0022Taylor\u0022\r\n },\r\n \u0022vehicles\u0022: [{\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123],\r\n \u0022and so forth\u0022: {\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123],\r\n \u0022test\u0022: {\r\n \u0022first\u0022: \u0022Billy\u0022,\r\n \u0022last\u0022: \u0022Bob\u0022,\r\n \u0022middle\u0022: \u0022Taylor\u0022\r\n }\r\n }\r\n }, {\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123],\r\n \u0022junk\u0022: {\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123],\r\n \u0022so on\u0022: {\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123]\r\n }\r\n }\r\n }]\r\n}));","IsDeferred":false},{"Name":"_.cloneDeep","Code":"let deepCopy = _.cloneDeep({\r\n \u0022name\u0022: {\r\n \u0022first\u0022: \u0022Billy\u0022,\r\n \u0022last\u0022: \u0022Bob\u0022,\r\n \u0022middle\u0022: \u0022Taylor\u0022\r\n },\r\n \u0022vehicles\u0022: [{\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123],\r\n \u0022and so forth\u0022: {\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123],\r\n \u0022test\u0022: {\r\n \u0022first\u0022: \u0022Billy\u0022,\r\n \u0022last\u0022: \u0022Bob\u0022,\r\n \u0022middle\u0022: \u0022Taylor\u0022\r\n }\r\n }\r\n }, {\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123],\r\n \u0022junk\u0022: {\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123],\r\n \u0022so on\u0022: {\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123]\r\n }\r\n }\r\n }]\r\n});","IsDeferred":false},{"Name":"Custom Copy","Code":"function copy(value) {\r\n if (value === null || value === undefined) {\r\n return value;\r\n }\r\n \r\n // Array, just call copy on each entry, map returns a new array.\r\n if (Array.isArray(value)) {\r\n return value.map(copy);\r\n } \r\n // Create a new object and copy everything\r\n else if (typeof value === \u0027object\u0027) {\r\n return Object.keys(value).reduce((copied, key) =\u003E {\r\n copied[key] = copy(value[key]);\r\n return copied;\r\n }, {});\r\n } else {\r\n // Otherwise it is a scalar anyways.\r\n return value;\r\n }\r\n}\r\nconst customCopy = copy({\r\n \u0022name\u0022: {\r\n \u0022first\u0022: \u0022Billy\u0022,\r\n \u0022last\u0022: \u0022Bob\u0022,\r\n \u0022middle\u0022: \u0022Taylor\u0022\r\n },\r\n \u0022vehicles\u0022: [{\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123],\r\n \u0022and so forth\u0022: {\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123],\r\n \u0022test\u0022: {\r\n \u0022first\u0022: \u0022Billy\u0022,\r\n \u0022last\u0022: \u0022Bob\u0022,\r\n \u0022middle\u0022: \u0022Taylor\u0022\r\n }\r\n }\r\n }, {\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123],\r\n \u0022junk\u0022: {\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123],\r\n \u0022so on\u0022: {\r\n \u0022id\u0022: \u00221\u0022,\r\n \u0022brand\u0022: \u0022Toyota\u0022,\r\n \u0022make\u0022: \u0022Camry\u0022,\r\n \u0022year\u0022: 2020,\r\n \u0022nested\u0022: [1,2,3,4,5],\r\n \u0022other\u0022: [\u0022abc\u0022, 123]\r\n }\r\n }\r\n }]\r\n});","IsDeferred":false}]}