Added deep clone method.

This commit is contained in:
Martin Edenhofer 2014-09-10 01:31:47 +02:00
parent 99872b7a63
commit 0f1eb5dd55

View file

@ -66,6 +66,13 @@ function difference(object1, object2) {
return changes; return changes;
} }
function clone(object) {
if (!object) {
return object
}
return JSON.parse(JSON.stringify(object));
}
jQuery.event.special.remove = { jQuery.event.special.remove = {
remove: function(e) { remove: function(e) {
if (e.handler) e.handler(); if (e.handler) e.handler();