JSFiddle - React, Tailwind, and code Playground
JavaScript
function Custom() {
this.prop = 'before';
};
var original = { custom: new Custom() };
var copy = $.extend(true, {}, original);
console.log(original, copy);
copy.custom.prop = 'after'; // changing the copy should not affect the original
console.log((original.custom.prop === 'before' && 'PASS') || 'FAIL');