Code of Deep Freeze
function deepFreeze(o) {
Object.freeze(o);
var objIsFunction = typeof o === 'function';
Object.getOwnPropertyNames(o).forEach(function (prop) {
if (o.hasOwnProperty(prop)
&& o[prop] !== null
&& (typeof o[prop] === "object" || typeof o[prop] === "function")
&& (objIsFunction ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments' : true)
&& !Object.isFrozen(o[prop])) {
deepFreeze(o[prop]);
}
});
return o;
};