{"ScriptPreparationCode":"var sampleObject = [{\r\n \u0022id\u0022: \u00220001\u0022,\r\n \u0022type\u0022: \u0022donut\u0022,\r\n \u0022name\u0022: \u0022Cake\u0022,\r\n \u0022ppu\u0022: 0.55,\r\n \u0022batters\u0022: {\r\n \u0022batter\u0022: [{\r\n \u0022id\u0022: \u00221001\u0022,\r\n \u0022type\u0022: \u0022Regular\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00221002\u0022,\r\n \u0022type\u0022: \u0022Chocolate\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00221003\u0022,\r\n \u0022type\u0022: \u0022Blueberry\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00221004\u0022,\r\n \u0022type\u0022: \u0022Devil\u0027s Food\u0022\r\n }\r\n ]\r\n },\r\n \u0022topping\u0022: [{\r\n \u0022id\u0022: \u00225001\u0022,\r\n \u0022type\u0022: \u0022None\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00225002\u0022,\r\n \u0022type\u0022: \u0022Glazed\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00225005\u0022,\r\n \u0022type\u0022: \u0022Sugar\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00225007\u0022,\r\n \u0022type\u0022: \u0022Powdered Sugar\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00225006\u0022,\r\n \u0022type\u0022: \u0022Chocolate with Sprinkles\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00225003\u0022,\r\n \u0022type\u0022: \u0022Chocolate\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00225004\u0022,\r\n \u0022type\u0022: \u0022Maple\u0022\r\n }\r\n ]\r\n },\r\n {\r\n \u0022id\u0022: \u00220002\u0022,\r\n \u0022type\u0022: \u0022donut\u0022,\r\n \u0022name\u0022: \u0022Raised\u0022,\r\n \u0022ppu\u0022: 0.55,\r\n \u0022batters\u0022: {\r\n \u0022batter\u0022: [{\r\n \u0022id\u0022: \u00221001\u0022,\r\n \u0022type\u0022: \u0022Regular\u0022\r\n }]\r\n },\r\n \u0022topping\u0022: [{\r\n \u0022id\u0022: \u00225001\u0022,\r\n \u0022type\u0022: \u0022None\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00225002\u0022,\r\n \u0022type\u0022: \u0022Glazed\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00225005\u0022,\r\n \u0022type\u0022: \u0022Sugar\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00225003\u0022,\r\n \u0022type\u0022: \u0022Chocolate\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00225004\u0022,\r\n \u0022type\u0022: \u0022Maple\u0022\r\n }\r\n ]\r\n },\r\n {\r\n \u0022id\u0022: \u00220003\u0022,\r\n \u0022type\u0022: \u0022donut\u0022,\r\n \u0022name\u0022: \u0022Old Fashioned\u0022,\r\n \u0022ppu\u0022: 0.55,\r\n \u0022batters\u0022: {\r\n \u0022batter\u0022: [{\r\n \u0022id\u0022: \u00221001\u0022,\r\n \u0022type\u0022: \u0022Regular\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00221002\u0022,\r\n \u0022type\u0022: \u0022Chocolate\u0022\r\n }\r\n ]\r\n },\r\n \u0022topping\u0022: [{\r\n \u0022id\u0022: \u00225001\u0022,\r\n \u0022type\u0022: \u0022None\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00225002\u0022,\r\n \u0022type\u0022: \u0022Glazed\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00225003\u0022,\r\n \u0022type\u0022: \u0022Chocolate\u0022\r\n },\r\n {\r\n \u0022id\u0022: \u00225004\u0022,\r\n \u0022type\u0022: \u0022Maple\u0022\r\n }\r\n ]\r\n }\r\n];\r\n\r\nvar myCopy = null;\r\n\r\n// minified clone-deep\r\nvar toString=Object.prototype.toString;function isObject(r){return\u0022[object Object]\u0022===Object.prototype.toString.call(r)}function isPlainObject(r){var e,t;return!1!==isObject(r)\u0026\u0026(void 0===(e=r.constructor)||!1!==isObject(t=e.prototype)\u0026\u0026!1!==t.hasOwnProperty(\u0022isPrototypeOf\u0022))}function kindOf(r){if(void 0===r)return\u0022undefined\u0022;if(null===r)return\u0022null\u0022;var e=typeof r;if(\u0022boolean\u0022===e)return\u0022boolean\u0022;if(\u0022string\u0022===e)return\u0022string\u0022;if(\u0022number\u0022===e)return\u0022number\u0022;if(\u0022symbol\u0022===e)return\u0022symbol\u0022;if(\u0022function\u0022===e)return isGeneratorFn(r)?\u0022generatorfunction\u0022:\u0022function\u0022;if(isArray(r))return\u0022array\u0022;if(isBuffer(r))return\u0022buffer\u0022;if(isArguments(r))return\u0022arguments\u0022;if(isDate(r))return\u0022date\u0022;if(isError(r))return\u0022error\u0022;if(isRegexp(r))return\u0022regexp\u0022;switch(ctorName(r)){case\u0022Symbol\u0022:return\u0022symbol\u0022;case\u0022Promise\u0022:return\u0022promise\u0022;case\u0022WeakMap\u0022:return\u0022weakmap\u0022;case\u0022WeakSet\u0022:return\u0022weakset\u0022;case\u0022Map\u0022:return\u0022map\u0022;case\u0022Set\u0022:return\u0022set\u0022;case\u0022Int8Array\u0022:return\u0022int8array\u0022;case\u0022Uint8Array\u0022:return\u0022uint8array\u0022;case\u0022Uint8ClampedArray\u0022:return\u0022uint8clampedarray\u0022;case\u0022Int16Array\u0022:return\u0022int16array\u0022;case\u0022Uint16Array\u0022:return\u0022uint16array\u0022;case\u0022Int32Array\u0022:return\u0022int32array\u0022;case\u0022Uint32Array\u0022:return\u0022uint32array\u0022;case\u0022Float32Array\u0022:return\u0022float32array\u0022;case\u0022Float64Array\u0022:return\u0022float64array\u0022}if(isGeneratorObj(r))return\u0022generator\u0022;switch(e=toString.call(r)){case\u0022[object Object]\u0022:return\u0022object\u0022;case\u0022[object Map Iterator]\u0022:return\u0022mapiterator\u0022;case\u0022[object Set Iterator]\u0022:return\u0022setiterator\u0022;case\u0022[object String Iterator]\u0022:return\u0022stringiterator\u0022;case\u0022[object Array Iterator]\u0022:return\u0022arrayiterator\u0022}return e.slice(8,-1).toLowerCase().replace(/\\s/g,\u0022\u0022)}function ctorName(r){return\u0022function\u0022==typeof r.constructor?r.constructor.name:null}function isArray(r){return Array.isArray?Array.isArray(r):r instanceof Array}function isError(r){return r instanceof Error||\u0022string\u0022==typeof r.message\u0026\u0026r.constructor\u0026\u0026\u0022number\u0022==typeof r.constructor.stackTraceLimit}function isDate(r){return r instanceof Date||\u0022function\u0022==typeof r.toDateString\u0026\u0026\u0022function\u0022==typeof r.getDate\u0026\u0026\u0022function\u0022==typeof r.setDate}function isRegexp(r){return r instanceof RegExp||\u0022string\u0022==typeof r.flags\u0026\u0026\u0022boolean\u0022==typeof r.ignoreCase\u0026\u0026\u0022boolean\u0022==typeof r.multiline\u0026\u0026\u0022boolean\u0022==typeof r.global}function isGeneratorFn(r,e){return\u0022GeneratorFunction\u0022===ctorName(r)}function isGeneratorObj(r){return\u0022function\u0022==typeof r.throw\u0026\u0026\u0022function\u0022==typeof r.return\u0026\u0026\u0022function\u0022==typeof r.next}function isArguments(r){try{if(\u0022number\u0022==typeof r.length\u0026\u0026\u0022function\u0022==typeof r.callee)return!0}catch(r){if(-1!==r.message.indexOf(\u0022callee\u0022))return!0}return!1}function isBuffer(r){return!(!r.constructor||\u0022function\u0022!=typeof r.constructor.isBuffer)\u0026\u0026r.constructor.isBuffer(r)}function cloneDeep(r,e){switch(kindOf(r)){case\u0022object\u0022:return cloneObjectDeep(r,e);case\u0022array\u0022:return cloneArrayDeep(r,e);default:return clone(r)}}function cloneObjectDeep(r,e){if(\u0022function\u0022==typeof e)return e(r);if(e||isPlainObject(r)){const t=new r.constructor;for(let n in r)t[n]=cloneDeep(r[n],e);return t}return r}function cloneArrayDeep(r,e){const t=new r.constructor(r.length);for(let n=0;n\u003Cr.length;n\u002B\u002B)t[n]=cloneDeep(r[n],e);return t}const valueOf=Symbol.prototype.valueOf;function clone(r,e){switch(kindOf(r)){case\u0022array\u0022:return r.slice();case\u0022object\u0022:return Object.assign({},r);case\u0022date\u0022:return new r.constructor(Number(r));case\u0022map\u0022:return new Map(r);case\u0022set\u0022:return new Set(r);case\u0022buffer\u0022:return cloneBuffer(r);case\u0022symbol\u0022:return cloneSymbol(r);case\u0022arraybuffer\u0022:return cloneArrayBuffer(r);case\u0022float32array\u0022:case\u0022float64array\u0022:case\u0022int16array\u0022:case\u0022int32array\u0022:case\u0022int8array\u0022:case\u0022uint16array\u0022:case\u0022uint32array\u0022:case\u0022uint8clampedarray\u0022:case\u0022uint8array\u0022:return cloneTypedArray(r);case\u0022regexp\u0022:return cloneRegExp(r);case\u0022error\u0022:return Object.create(r);default:return r}}function cloneRegExp(r){const e=void 0!==r.flags?r.flags:/\\w\u002B$/.exec(r)||void 0,t=new r.constructor(r.source,e);return t.lastIndex=r.lastIndex,t}function cloneArrayBuffer(r){const e=new r.constructor(r.byteLength);return new Uint8Array(e).set(new Uint8Array(r)),e}function cloneTypedArray(r,e){return new r.constructor(r.buffer,r.byteOffset,r.length)}function cloneBuffer(r){const e=r.length,t=Buffer.allocUnsafe?Buffer.allocUnsafe(e):Buffer.from(e);return r.copy(t),t}function cloneSymbol(r){return valueOf?Object(valueOf.call(r)):{}}","TestCases":[{"Name":"RFDC clone","Code":"var clone = rfdc();\r\nmyCopy = clone(sampleObject);","IsDeferred":false},{"Name":"LoDash cloneDeep clone","Code":"myCopy = _.cloneDeep(sampleObject);","IsDeferred":false},{"Name":"Json clone","Code":"myCopy = JSON.parse(JSON.stringify(sampleObject));","IsDeferred":false},{"Name":"clone-deep clone","Code":"myCopy = cloneDeep(sampleObject);","IsDeferred":false}]}