Comparing version 0.2.0 to 0.3.0
{ | ||
"name": "deep-diff", | ||
"main": "index.js", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/flitbit/diff", | ||
@@ -22,2 +22,5 @@ "authors": [ | ||
"app/bower_components", | ||
"build", | ||
"components", | ||
"component.json", | ||
"test", | ||
@@ -24,0 +27,0 @@ "tests" |
@@ -26,3 +26,2 @@ /*jshint indent:2, laxcomma:true, laxbreak:true*/ | ||
// get the difference... | ||
@@ -29,0 +28,0 @@ records = diff(prior, comparand); |
@@ -0,1 +1,5 @@ | ||
/*! | ||
* deep-diff. | ||
* Licensed under the MIT License. | ||
*/ | ||
/*jshint indent:2, laxcomma:true*/ | ||
@@ -305,3 +309,3 @@ ;(function (undefined) { | ||
revertChange: { value: revertChange, enumerable: true }, | ||
isConflict: { get: function () { return 'undefined' !== typeof conflict; }, enumerable: true }, | ||
isConflict: { value: function () { return 'undefined' !== typeof conflict; }, enumerable: true }, | ||
noConflict: { | ||
@@ -324,2 +328,2 @@ value: function () { | ||
} | ||
}()); | ||
}()); |
{ | ||
"name": "deep-diff", | ||
"description": "Javascript utility for calculating deep difference, capturing changes, and applying changes across objects; for nodejs and the browser.", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"license": "MIT", | ||
@@ -34,4 +34,4 @@ "keywords": [ | ||
"scripts": { | ||
"test": "mocha -R spec" | ||
"test": "./node_modules/.bin/mocha -R spec" | ||
} | ||
} |
@@ -1,1 +0,5 @@ | ||
!function(e){"use strict";var t,n,r=[];if(typeof global=="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){r.push(function(){if("undefined"!==typeof n&&t.DeepDiff===h){t.DeepDiff=n;n=e}})}function i(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function f(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function u(e,t,n){u.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}i(u,f);function a(e,t){a.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}i(a,f);function l(e,t){l.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}i(l,f);function o(e,t,n){o.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}i(o,f);function s(e,t,n){var r=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,r);return e}function c(t,n,r,i,f,h){i=i||[];var p=i.slice(0);if(f){p.push(f)}var b=typeof t;var d=typeof n;if(b==="undefined"){if(d!=="undefined"){r(new a(p,n))}}else if(d==="undefined"){r(new l(p,t))}else if(b!==d){r(new u(p,t,n))}else if(b==="object"&&t!=null){h=h||[];if(h.indexOf(t)<0){h.push(t);if(Array.isArray(t)){var v,y=t.length,m=function(e){r(new o(p,v,e))};for(v=0;v<t.length;v++){if(v>=n.length){r(new o(p,v,new l(e,t[v])))}else{c(t[v],n[v],m,[],null,h)}}while(v<n.length){r(new o(p,v,new a(e,n[v++])))}}else{var g=Object.keys(t);var w=Object.keys(n);g.forEach(function(i){var f=w.indexOf(i);if(f>=0){c(t[i],n[i],r,p,i,h);w=s(w,f)}else{c(t[i],e,r,p,i,h)}});w.forEach(function(t){c(e,n[t],r,p,t,h)})}h.length=h.length-1}}else if(t!==n){r(new u(p,t,n))}}function h(t,n,r){r=r||[];c(t,n,function(e){if(e){r.push(e)}});return r.length?r:e}function p(e,t,n){if(n.path&&n.path.length){var r=e[t],i,f=n.path.length-1;for(i=0;i<f;i++){r=r[n.path[i]]}switch(n.kind){case"A":p(r,n.index,n.item);break;case"D":delete r[n.path[i]];break;case"E":case"N":r[n.path[i]]=n.rhs;break}}else{switch(n.kind){case"A":p(e[t],n.index,n.item);break;case"D":e=s(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(!(n instanceof f)){throw new TypeError("[Object] change must be instanceof Diff")}if(e&&t&&n){var r=e,i,u;u=n.path.length-1;for(i=0;i<u;i++){if(typeof r[n.path[i]]==="undefined"){r[n.path[i]]={}}r=r[n.path[i]]}switch(n.kind){case"A":p(r[n.path[i]],n.index,n.item);break;case"D":delete r[n.path[i]];break;case"E":case"N":r[n.path[i]]=n.rhs;break}}}function d(e,t,n){if(e&&t){var r=function(r){if(!n||n(e,t,r)){b(e,t,r)}};c(e,t,r)}}Object.defineProperties(h,{diff:{value:h,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:d,enumerable:true},applyChange:{value:b,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(r){r.forEach(function(e){e()});r=null}return h},enumerable:true}});if(typeof module!="undefined"&&module&&typeof exports=="object"&&exports&&module.exports===exports){module.exports=h}else{t.DeepDiff=h}}(); | ||
/*! | ||
* deep-diff-0.1.3. | ||
* Licensed under the MIT License. | ||
*/ | ||
!function(e){"use strict";var t,n,r=[];if(typeof global=="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){r.push(function(){if("undefined"!==typeof n&&t.DeepDiff===h){t.DeepDiff=n;n=e}})}function i(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function f(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function u(e,t,n){u.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}i(u,f);function a(e,t){a.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}i(a,f);function l(e,t){l.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}i(l,f);function o(e,t,n){o.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}i(o,f);function s(e,t,n){var r=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,r);return e}function c(t,n,r,i,f,h){i=i||[];var p=i.slice(0);if(f){p.push(f)}var b=typeof t;var d=typeof n;if(b==="undefined"){if(d!=="undefined"){r(new a(p,n))}}else if(d==="undefined"){r(new l(p,t))}else if(b!==d){r(new u(p,t,n))}else if(b==="object"&&t!=null){h=h||[];if(h.indexOf(t)<0){h.push(t);if(Array.isArray(t)){var v,y=t.length,m=function(e){r(new o(p,v,e))};for(v=0;v<t.length;v++){if(v>=n.length){r(new o(p,v,new l(e,t[v])))}else{c(t[v],n[v],m,[],null,h)}}while(v<n.length){r(new o(p,v,new a(e,n[v++])))}}else{var g=Object.keys(t);var w=Object.keys(n);g.forEach(function(i){var f=w.indexOf(i);if(f>=0){c(t[i],n[i],r,p,i,h);w=s(w,f)}else{c(t[i],e,r,p,i,h)}});w.forEach(function(t){c(e,n[t],r,p,t,h)})}h.length=h.length-1}}else if(t!==n){r(new u(p,t,n))}}function h(t,n,r){r=r||[];c(t,n,function(e){if(e){r.push(e)}});return r.length?r:e}function p(e,t,n){if(n.path&&n.path.length){var r=e[t],i,f=n.path.length-1;for(i=0;i<f;i++){r=r[n.path[i]]}switch(n.kind){case"A":p(r,n.index,n.item);break;case"D":delete r[n.path[i]];break;case"E":case"N":r[n.path[i]]=n.rhs;break}}else{switch(n.kind){case"A":p(e[t],n.index,n.item);break;case"D":e=s(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(!(n instanceof f)){throw new TypeError("[Object] change must be instanceof Diff")}if(e&&t&&n){var r=e,i,u;u=n.path.length-1;for(i=0;i<u;i++){if(typeof r[n.path[i]]==="undefined"){r[n.path[i]]={}}r=r[n.path[i]]}switch(n.kind){case"A":p(r[n.path[i]],n.index,n.item);break;case"D":delete r[n.path[i]];break;case"E":case"N":r[n.path[i]]=n.rhs;break}}}function d(e,t,n){if(e&&t){var r=function(r){if(!n||n(e,t,r)){b(e,t,r)}};c(e,t,r)}}Object.defineProperties(h,{diff:{value:h,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:d,enumerable:true},applyChange:{value:b,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(r){r.forEach(function(e){e()});r=null}return h},enumerable:true}});if(typeof module!="undefined"&&module&&typeof exports=="object"&&exports&&module.exports===exports){module.exports=h}else{t.DeepDiff=h}}(); |
@@ -1,1 +0,5 @@ | ||
!function(e){"use strict";var t,n,i=[];if(typeof global=="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){i.push(function(){if("undefined"!==typeof n&&t.DeepDiff===h){t.DeepDiff=n;n=e}})}function r(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function f(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function a(e,t,n){a.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}r(a,f);function u(e,t){u.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}r(u,f);function l(e,t){l.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}r(l,f);function o(e,t,n){o.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}r(o,f);function s(e,t,n){var i=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,i);return e}function c(t,n,i,r,f,h){r=r||[];var p=r.slice(0);if(f){p.push(f)}var b=typeof t;var d=typeof n;if(b==="undefined"){if(d!=="undefined"){i(new u(p,n))}}else if(d==="undefined"){i(new l(p,t))}else if(b!==d){i(new a(p,t,n))}else if(t instanceof Date&&n instanceof Date&&t-n!=0){i(new a(p,t,n))}else if(b==="object"&&t!=null&&n!=null){h=h||[];if(h.indexOf(t)<0){h.push(t);if(Array.isArray(t)){var v,y=t.length,m=function(e){i(new o(p,v,e))};for(v=0;v<t.length;v++){if(v>=n.length){i(new o(p,v,new l(e,t[v])))}else{c(t[v],n[v],m,[],null,h)}}while(v<n.length){i(new o(p,v,new u(e,n[v++])))}}else{var g=Object.keys(t);var w=Object.keys(n);g.forEach(function(r){var f=w.indexOf(r);if(f>=0){c(t[r],n[r],i,p,r,h);w=s(w,f)}else{c(t[r],e,i,p,r,h)}});w.forEach(function(t){c(e,n[t],i,p,t,h)})}h.length=h.length-1}}else if(t!==n){i(new a(p,t,n))}}function h(t,n,i){i=i||[];c(t,n,function(e){if(e){i.push(e)}});return i.length?i:e}function p(e,t,n){if(n.path&&n.path.length){var i=e[t],r,f=n.path.length-1;for(r=0;r<f;r++){i=i[n.path[r]]}switch(n.kind){case"A":p(i,n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}else{switch(n.kind){case"A":p(e[t],n.index,n.item);break;case"D":e=s(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(!(n instanceof f)){throw new TypeError("[Object] change must be instanceof Diff")}if(e&&t&&n){var i=e,r,a;a=n.path.length-1;for(r=0;r<a;r++){if(typeof i[n.path[r]]==="undefined"){i[n.path[r]]={}}i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}}function d(e,t,n){if(e&&t){var i=function(i){if(!n||n(e,t,i)){b(e,t,i)}};c(e,t,i)}}Object.defineProperties(h,{diff:{value:h,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:d,enumerable:true},applyChange:{value:b,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(i){i.forEach(function(e){e()});i=null}return h},enumerable:true}});if(typeof module!="undefined"&&module&&typeof exports=="object"&&exports&&module.exports===exports){module.exports=h}else{t.DeepDiff=h}}(); | ||
/*! | ||
* deep-diff-0.1.4. | ||
* Licensed under the MIT License. | ||
*/ | ||
!function(e){"use strict";var t,n,i=[];if(typeof global=="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){i.push(function(){if("undefined"!==typeof n&&t.DeepDiff===h){t.DeepDiff=n;n=e}})}function r(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function f(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function a(e,t,n){a.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}r(a,f);function u(e,t){u.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}r(u,f);function l(e,t){l.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}r(l,f);function o(e,t,n){o.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}r(o,f);function s(e,t,n){var i=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,i);return e}function c(t,n,i,r,f,h){r=r||[];var p=r.slice(0);if(f){p.push(f)}var b=typeof t;var d=typeof n;if(b==="undefined"){if(d!=="undefined"){i(new u(p,n))}}else if(d==="undefined"){i(new l(p,t))}else if(b!==d){i(new a(p,t,n))}else if(t instanceof Date&&n instanceof Date&&t-n!=0){i(new a(p,t,n))}else if(b==="object"&&t!=null&&n!=null){h=h||[];if(h.indexOf(t)<0){h.push(t);if(Array.isArray(t)){var v,y=t.length,m=function(e){i(new o(p,v,e))};for(v=0;v<t.length;v++){if(v>=n.length){i(new o(p,v,new l(e,t[v])))}else{c(t[v],n[v],m,[],null,h)}}while(v<n.length){i(new o(p,v,new u(e,n[v++])))}}else{var g=Object.keys(t);var w=Object.keys(n);g.forEach(function(r){var f=w.indexOf(r);if(f>=0){c(t[r],n[r],i,p,r,h);w=s(w,f)}else{c(t[r],e,i,p,r,h)}});w.forEach(function(t){c(e,n[t],i,p,t,h)})}h.length=h.length-1}}else if(t!==n){i(new a(p,t,n))}}function h(t,n,i){i=i||[];c(t,n,function(e){if(e){i.push(e)}});return i.length?i:e}function p(e,t,n){if(n.path&&n.path.length){var i=e[t],r,f=n.path.length-1;for(r=0;r<f;r++){i=i[n.path[r]]}switch(n.kind){case"A":p(i,n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}else{switch(n.kind){case"A":p(e[t],n.index,n.item);break;case"D":e=s(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(!(n instanceof f)){throw new TypeError("[Object] change must be instanceof Diff")}if(e&&t&&n){var i=e,r,a;a=n.path.length-1;for(r=0;r<a;r++){if(typeof i[n.path[r]]==="undefined"){i[n.path[r]]={}}i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}}function d(e,t,n){if(e&&t){var i=function(i){if(!n||n(e,t,i)){b(e,t,i)}};c(e,t,i)}}Object.defineProperties(h,{diff:{value:h,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:d,enumerable:true},applyChange:{value:b,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(i){i.forEach(function(e){e()});i=null}return h},enumerable:true}});if(typeof module!="undefined"&&module&&typeof exports=="object"&&exports&&module.exports===exports){module.exports=h}else{t.DeepDiff=h}}(); |
@@ -1,1 +0,5 @@ | ||
!function(e){"use strict";var t,n,i=[];if(typeof global=="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){i.push(function(){if("undefined"!==typeof n&&t.DeepDiff===h){t.DeepDiff=n;n=e}})}function r(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function a(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function f(e,t,n){f.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}r(f,a);function u(e,t){u.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}r(u,a);function l(e,t){l.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}r(l,a);function o(e,t,n){o.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}r(o,a);function s(e,t,n){var i=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,i);return e}function c(t,n,i,r,a,h){r=r||[];var p=r.slice(0);if(a){p.push(a)}var b=typeof t;var d=typeof n;if(b==="undefined"){if(d!=="undefined"){i(new u(p,n))}}else if(d==="undefined"){i(new l(p,t))}else if(b!==d){i(new f(p,t,n))}else if(t instanceof Date&&n instanceof Date&&t-n!=0){i(new f(p,t,n))}else if(b==="object"&&t!=null&&n!=null){h=h||[];if(h.indexOf(t)<0){h.push(t);if(Array.isArray(t)){var v,y=t.length,m=function(e){i(new o(p,v,e))};for(v=0;v<t.length;v++){if(v>=n.length){i(new o(p,v,new l(e,t[v])))}else{c(t[v],n[v],m,[],null,h)}}while(v<n.length){i(new o(p,v,new u(e,n[v++])))}}else{var g=Object.keys(t);var w=Object.keys(n);g.forEach(function(r){var a=w.indexOf(r);if(a>=0){c(t[r],n[r],i,p,r,h);w=s(w,a)}else{c(t[r],e,i,p,r,h)}});w.forEach(function(t){c(e,n[t],i,p,t,h)})}h.length=h.length-1}}else if(t!==n){if(!(b==="number"&&isNaN(t)&&isNaN(n))){i(new f(p,t,n))}}}function h(t,n,i){i=i||[];c(t,n,function(e){if(e){i.push(e)}});return i.length?i:e}function p(e,t,n){if(n.path&&n.path.length){var i=e[t],r,a=n.path.length-1;for(r=0;r<a;r++){i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}else{switch(n.kind){case"A":p(e[t],n.index,n.item);break;case"D":e=s(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(!(n instanceof a)){throw new TypeError("[Object] change must be instanceof Diff")}if(e&&t&&n){var i=e,r,f;f=n.path.length-1;for(r=0;r<f;r++){if(typeof i[n.path[r]]==="undefined"){i[n.path[r]]={}}i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}}function d(e,t,n){if(e&&t){var i=function(i){if(!n||n(e,t,i)){b(e,t,i)}};c(e,t,i)}}Object.defineProperties(h,{diff:{value:h,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:d,enumerable:true},applyChange:{value:b,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(i){i.forEach(function(e){e()});i=null}return h},enumerable:true}});if(typeof module!="undefined"&&module&&typeof exports=="object"&&exports&&module.exports===exports){module.exports=h}else{t.DeepDiff=h}}(); | ||
/*! | ||
* deep-diff-0.1.5. | ||
* Licensed under the MIT License. | ||
*/ | ||
!function(e){"use strict";var t,n,i=[];if(typeof global=="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){i.push(function(){if("undefined"!==typeof n&&t.DeepDiff===h){t.DeepDiff=n;n=e}})}function r(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function a(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function f(e,t,n){f.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}r(f,a);function u(e,t){u.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}r(u,a);function l(e,t){l.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}r(l,a);function o(e,t,n){o.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}r(o,a);function s(e,t,n){var i=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,i);return e}function c(t,n,i,r,a,h){r=r||[];var p=r.slice(0);if(a){p.push(a)}var b=typeof t;var d=typeof n;if(b==="undefined"){if(d!=="undefined"){i(new u(p,n))}}else if(d==="undefined"){i(new l(p,t))}else if(b!==d){i(new f(p,t,n))}else if(t instanceof Date&&n instanceof Date&&t-n!=0){i(new f(p,t,n))}else if(b==="object"&&t!=null&&n!=null){h=h||[];if(h.indexOf(t)<0){h.push(t);if(Array.isArray(t)){var v,y=t.length,m=function(e){i(new o(p,v,e))};for(v=0;v<t.length;v++){if(v>=n.length){i(new o(p,v,new l(e,t[v])))}else{c(t[v],n[v],m,[],null,h)}}while(v<n.length){i(new o(p,v,new u(e,n[v++])))}}else{var g=Object.keys(t);var w=Object.keys(n);g.forEach(function(r){var a=w.indexOf(r);if(a>=0){c(t[r],n[r],i,p,r,h);w=s(w,a)}else{c(t[r],e,i,p,r,h)}});w.forEach(function(t){c(e,n[t],i,p,t,h)})}h.length=h.length-1}}else if(t!==n){if(!(b==="number"&&isNaN(t)&&isNaN(n))){i(new f(p,t,n))}}}function h(t,n,i){i=i||[];c(t,n,function(e){if(e){i.push(e)}});return i.length?i:e}function p(e,t,n){if(n.path&&n.path.length){var i=e[t],r,a=n.path.length-1;for(r=0;r<a;r++){i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}else{switch(n.kind){case"A":p(e[t],n.index,n.item);break;case"D":e=s(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(!(n instanceof a)){throw new TypeError("[Object] change must be instanceof Diff")}if(e&&t&&n){var i=e,r,f;f=n.path.length-1;for(r=0;r<f;r++){if(typeof i[n.path[r]]==="undefined"){i[n.path[r]]={}}i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}}function d(e,t,n){if(e&&t){var i=function(i){if(!n||n(e,t,i)){b(e,t,i)}};c(e,t,i)}}Object.defineProperties(h,{diff:{value:h,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:d,enumerable:true},applyChange:{value:b,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(i){i.forEach(function(e){e()});i=null}return h},enumerable:true}});if(typeof module!="undefined"&&module&&typeof exports=="object"&&exports&&module.exports===exports){module.exports=h}else{t.DeepDiff=h}}(); |
@@ -1,1 +0,5 @@ | ||
!function(e){"use strict";var t,n,i=[];if(typeof global=="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){i.push(function(){if("undefined"!==typeof n&&t.DeepDiff===h){t.DeepDiff=n;n=e}})}function r(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function a(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function f(e,t,n){f.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}r(f,a);function u(e,t){u.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}r(u,a);function l(e,t){l.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}r(l,a);function o(e,t,n){o.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}r(o,a);function s(e,t,n){var i=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,i);return e}function c(t,n,i,r,a,h){r=r||[];var p=r.slice(0);if(a){p.push(a)}var b=typeof t;var d=typeof n;if(b==="undefined"){if(d!=="undefined"){i(new u(p,n))}}else if(d==="undefined"){i(new l(p,t))}else if(b!==d){i(new f(p,t,n))}else if(t instanceof Date&&n instanceof Date&&t-n!=0){i(new f(p,t,n))}else if(b==="object"&&t!=null&&n!=null){h=h||[];if(h.indexOf(t)<0){h.push(t);if(Array.isArray(t)){var v,y=t.length,m=function(e){i(new o(p,v,e))};for(v=0;v<t.length;v++){if(v>=n.length){i(new o(p,v,new l(e,t[v])))}else{c(t[v],n[v],m,[],null,h)}}while(v<n.length){i(new o(p,v,new u(e,n[v++])))}}else{var g=Object.keys(t);var w=Object.keys(n);g.forEach(function(r){var a=w.indexOf(r);if(a>=0){c(t[r],n[r],i,p,r,h);w=s(w,a)}else{c(t[r],e,i,p,r,h)}});w.forEach(function(t){c(e,n[t],i,p,t,h)})}h.length=h.length-1}}else if(t!==n){if(!(b==="number"&&isNaN(t)&&isNaN(n))){i(new f(p,t,n))}}}function h(t,n,i){i=i||[];c(t,n,function(e){if(e){i.push(e)}});return i.length?i:e}function p(e,t,n){if(n.path&&n.path.length){var i=e[t],r,a=n.path.length-1;for(r=0;r<a;r++){i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}else{switch(n.kind){case"A":p(e[t],n.index,n.item);break;case"D":e=s(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(!(n instanceof a)){throw new TypeError("[Object] change must be instanceof Diff")}if(e&&t&&n){var i=e,r,f;f=n.path.length-1;for(r=0;r<f;r++){if(typeof i[n.path[r]]==="undefined"){i[n.path[r]]={}}i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}}function d(e,t,n){if(e&&t){var i=function(i){if(!n||n(e,t,i)){b(e,t,i)}};c(e,t,i)}}Object.defineProperties(h,{diff:{value:h,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:d,enumerable:true},applyChange:{value:b,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(i){i.forEach(function(e){e()});i=null}return h},enumerable:true}});if(typeof module!="undefined"&&module&&typeof exports=="object"&&exports&&module.exports===exports){module.exports=h}else{t.DeepDiff=h}}(); | ||
/*! | ||
* deep-diff-0.1.6. | ||
* Licensed under the MIT License. | ||
*/ | ||
!function(e){"use strict";var t,n,i=[];if(typeof global=="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){i.push(function(){if("undefined"!==typeof n&&t.DeepDiff===h){t.DeepDiff=n;n=e}})}function r(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function a(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function f(e,t,n){f.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}r(f,a);function u(e,t){u.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}r(u,a);function l(e,t){l.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}r(l,a);function o(e,t,n){o.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}r(o,a);function s(e,t,n){var i=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,i);return e}function c(t,n,i,r,a,h){r=r||[];var p=r.slice(0);if(a){p.push(a)}var b=typeof t;var d=typeof n;if(b==="undefined"){if(d!=="undefined"){i(new u(p,n))}}else if(d==="undefined"){i(new l(p,t))}else if(b!==d){i(new f(p,t,n))}else if(t instanceof Date&&n instanceof Date&&t-n!=0){i(new f(p,t,n))}else if(b==="object"&&t!=null&&n!=null){h=h||[];if(h.indexOf(t)<0){h.push(t);if(Array.isArray(t)){var v,y=t.length,m=function(e){i(new o(p,v,e))};for(v=0;v<t.length;v++){if(v>=n.length){i(new o(p,v,new l(e,t[v])))}else{c(t[v],n[v],m,[],null,h)}}while(v<n.length){i(new o(p,v,new u(e,n[v++])))}}else{var g=Object.keys(t);var w=Object.keys(n);g.forEach(function(r){var a=w.indexOf(r);if(a>=0){c(t[r],n[r],i,p,r,h);w=s(w,a)}else{c(t[r],e,i,p,r,h)}});w.forEach(function(t){c(e,n[t],i,p,t,h)})}h.length=h.length-1}}else if(t!==n){if(!(b==="number"&&isNaN(t)&&isNaN(n))){i(new f(p,t,n))}}}function h(t,n,i){i=i||[];c(t,n,function(e){if(e){i.push(e)}});return i.length?i:e}function p(e,t,n){if(n.path&&n.path.length){var i=e[t],r,a=n.path.length-1;for(r=0;r<a;r++){i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}else{switch(n.kind){case"A":p(e[t],n.index,n.item);break;case"D":e=s(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(!(n instanceof a)){throw new TypeError("[Object] change must be instanceof Diff")}if(e&&t&&n){var i=e,r,f;f=n.path.length-1;for(r=0;r<f;r++){if(typeof i[n.path[r]]==="undefined"){i[n.path[r]]={}}i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}}function d(e,t,n){if(e&&t){var i=function(i){if(!n||n(e,t,i)){b(e,t,i)}};c(e,t,i)}}Object.defineProperties(h,{diff:{value:h,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:d,enumerable:true},applyChange:{value:b,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(i){i.forEach(function(e){e()});i=null}return h},enumerable:true}});if(typeof module!="undefined"&&module&&typeof exports=="object"&&exports&&module.exports===exports){module.exports=h}else{t.DeepDiff=h}}(); |
@@ -1,1 +0,5 @@ | ||
!function(e){"use strict";var t,n,i=[];if(typeof global=="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){i.push(function(){if("undefined"!==typeof n&&t.DeepDiff===h){t.DeepDiff=n;n=e}})}function r(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function f(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function a(e,t,n){a.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}r(a,f);function u(e,t){u.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}r(u,f);function l(e,t){l.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}r(l,f);function o(e,t,n){o.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}r(o,f);function s(e,t,n){var i=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,i);return e}function c(t,n,i,r,f,h,p){f=f||[];var b=f.slice(0);if(h){if(r&&r(b,h))return;b.push(h)}var d=typeof t;var v=typeof n;if(d==="undefined"){if(v!=="undefined"){i(new u(b,n))}}else if(v==="undefined"){i(new l(b,t))}else if(d!==v){i(new a(b,t,n))}else if(t instanceof Date&&n instanceof Date&&t-n!=0){i(new a(b,t,n))}else if(d==="object"&&t!=null&&n!=null){p=p||[];if(p.indexOf(t)<0){p.push(t);if(Array.isArray(t)){var y,m=t.length,g=function(e){i(new o(b,y,e))};for(y=0;y<t.length;y++){if(y>=n.length){i(new o(b,y,new l(e,t[y])))}else{c(t[y],n[y],g,r,[],null,p)}}while(y<n.length){i(new o(b,y,new u(e,n[y++])))}}else{var w=Object.keys(t);var D=Object.keys(n);w.forEach(function(f){var a=D.indexOf(f);if(a>=0){c(t[f],n[f],i,r,b,f,p);D=s(D,a)}else{c(t[f],e,i,r,b,f,p)}});D.forEach(function(t){c(e,n[t],i,r,b,t,p)})}p.length=p.length-1}}else if(t!==n){if(!(d==="number"&&isNaN(t)&&isNaN(n))){i(new a(b,t,n))}}}function h(t,n,i,r){r=r||[];c(t,n,function(e){if(e){r.push(e)}},i);return r.length?r:e}function p(e,t,n){if(n.path&&n.path.length){var i=e[t],r,f=n.path.length-1;for(r=0;r<f;r++){i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}else{switch(n.kind){case"A":p(e[t],n.index,n.item);break;case"D":e=s(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(!(n instanceof f)){throw new TypeError("[Object] change must be instanceof Diff")}if(e&&t&&n){var i=e,r,a;a=n.path.length-1;for(r=0;r<a;r++){if(typeof i[n.path[r]]==="undefined"){i[n.path[r]]={}}i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}}function d(e,t,n){if(e&&t){var i=function(i){if(!n||n(e,t,i)){b(e,t,i)}};c(e,t,i)}}Object.defineProperties(h,{diff:{value:h,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:d,enumerable:true},applyChange:{value:b,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(i){i.forEach(function(e){e()});i=null}return h},enumerable:true}});if(typeof module!="undefined"&&module&&typeof exports=="object"&&exports&&module.exports===exports){module.exports=h}else{t.DeepDiff=h}}(); | ||
/*! | ||
* deep-diff-0.1.7. | ||
* Licensed under the MIT License. | ||
*/ | ||
!function(e){"use strict";var t,n,i=[];if(typeof global=="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){i.push(function(){if("undefined"!==typeof n&&t.DeepDiff===h){t.DeepDiff=n;n=e}})}function r(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function f(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function a(e,t,n){a.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}r(a,f);function u(e,t){u.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}r(u,f);function l(e,t){l.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}r(l,f);function o(e,t,n){o.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}r(o,f);function s(e,t,n){var i=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,i);return e}function c(t,n,i,r,f,h,p){f=f||[];var b=f.slice(0);if(h){if(r&&r(b,h))return;b.push(h)}var d=typeof t;var v=typeof n;if(d==="undefined"){if(v!=="undefined"){i(new u(b,n))}}else if(v==="undefined"){i(new l(b,t))}else if(d!==v){i(new a(b,t,n))}else if(t instanceof Date&&n instanceof Date&&t-n!=0){i(new a(b,t,n))}else if(d==="object"&&t!=null&&n!=null){p=p||[];if(p.indexOf(t)<0){p.push(t);if(Array.isArray(t)){var y,m=t.length,g=function(e){i(new o(b,y,e))};for(y=0;y<t.length;y++){if(y>=n.length){i(new o(b,y,new l(e,t[y])))}else{c(t[y],n[y],g,r,[],null,p)}}while(y<n.length){i(new o(b,y,new u(e,n[y++])))}}else{var w=Object.keys(t);var D=Object.keys(n);w.forEach(function(f){var a=D.indexOf(f);if(a>=0){c(t[f],n[f],i,r,b,f,p);D=s(D,a)}else{c(t[f],e,i,r,b,f,p)}});D.forEach(function(t){c(e,n[t],i,r,b,t,p)})}p.length=p.length-1}}else if(t!==n){if(!(d==="number"&&isNaN(t)&&isNaN(n))){i(new a(b,t,n))}}}function h(t,n,i,r){r=r||[];c(t,n,function(e){if(e){r.push(e)}},i);return r.length?r:e}function p(e,t,n){if(n.path&&n.path.length){var i=e[t],r,f=n.path.length-1;for(r=0;r<f;r++){i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}else{switch(n.kind){case"A":p(e[t],n.index,n.item);break;case"D":e=s(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(!(n instanceof f)){throw new TypeError("[Object] change must be instanceof Diff")}if(e&&t&&n){var i=e,r,a;a=n.path.length-1;for(r=0;r<a;r++){if(typeof i[n.path[r]]==="undefined"){i[n.path[r]]={}}i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}}function d(e,t,n){if(e&&t){var i=function(i){if(!n||n(e,t,i)){b(e,t,i)}};c(e,t,i)}}Object.defineProperties(h,{diff:{value:h,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:d,enumerable:true},applyChange:{value:b,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(i){i.forEach(function(e){e()});i=null}return h},enumerable:true}});if(typeof module!="undefined"&&module&&typeof exports=="object"&&exports&&module.exports===exports){module.exports=h}else{t.DeepDiff=h}}(); |
@@ -1,1 +0,5 @@ | ||
!function(e){"use strict";var t,n,a=[];if(typeof global==="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){a.push(function(){if("undefined"!==typeof n&&t.DeepDiff===p){t.DeepDiff=n;n=e}})}function r(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function i(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function f(e,t,n){f.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}r(f,i);function l(e,t){l.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}r(l,i);function u(e,t){u.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}r(u,i);function s(e,t,n){s.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}r(s,i);function h(e,t,n){var a=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,a);return e}function c(t,n,a,r,i,p,o){i=i||[];var b=i.slice(0);if(typeof p!=="undefined"){if(r&&r(b,p)){return}b.push(p)}var d=typeof t;var k=typeof n;if(d==="undefined"){if(k!=="undefined"){a(new l(b,n))}}else if(k==="undefined"){a(new u(b,t))}else if(d!==k){a(new f(b,t,n))}else if(t instanceof Date&&n instanceof Date&&t-n!==0){a(new f(b,t,n))}else if(d==="object"&&t!==null&&n!==null){o=o||[];if(o.indexOf(t)<0){o.push(t);if(Array.isArray(t)){var v,y=t.length;for(v=0;v<t.length;v++){if(v>=n.length){a(new s(b,v,new u(e,t[v])))}else{c(t[v],n[v],a,r,b,v,o)}}while(v<n.length){a(new s(b,v,new l(e,n[v++])))}}else{var m=Object.keys(t);var g=Object.keys(n);m.forEach(function(i,f){var l=g.indexOf(i);if(l>=0){c(t[i],n[i],a,r,b,i,o);g=h(g,l)}else{c(t[i],e,a,r,b,i,o)}});g.forEach(function(t){c(e,n[t],a,r,b,t,o)})}o.length=o.length-1}}else if(t!==n){if(!(d==="number"&&isNaN(t)&&isNaN(n))){a(new f(b,t,n))}}}function p(t,n,a,r){r=r||[];c(t,n,function(e){if(e){r.push(e)}},a);return r.length?r:e}function o(e,t,n){if(n.path&&n.path.length){var a=e[t],r,i=n.path.length-1;for(r=0;r<i;r++){a=a[n.path[r]]}switch(n.kind){case"A":o(a[n.path[r]],n.index,n.item);break;case"D":delete a[n.path[r]];break;case"E":case"N":a[n.path[r]]=n.rhs;break}}else{switch(n.kind){case"A":o(e[t],n.index,n.item);break;case"D":e=h(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(e&&t&&n&&n.kind){var a=e,r=-1,i=n.path.length-1;while(++r<i){if(typeof a[n.path[r]]==="undefined"){a[n.path[r]]=typeof n.path[r]==="number"?new Array:{}}a=a[n.path[r]]}switch(n.kind){case"A":o(a[n.path[r]],n.index,n.item);break;case"D":delete a[n.path[r]];break;case"E":case"N":a[n.path[r]]=n.rhs;break}}}function d(e,t,n){if(n.path&&n.path.length){var a=e[t],r,i=n.path.length-1;for(r=0;r<i;r++){a=a[n.path[r]]}switch(n.kind){case"A":d(a[n.path[r]],n.index,n.item);break;case"D":a[n.path[r]]=n.lhs;break;case"E":a[n.path[r]]=n.lhs;break;case"N":delete a[n.path[r]];break}}else{switch(n.kind){case"A":d(e[t],n.index,n.item);break;case"D":e[t]=n.lhs;break;case"E":e[t]=n.lhs;break;case"N":e=h(e,t);break}}return e}function k(e,t,n){if(e&&t&&n&&n.kind){var a=e,r,i;i=n.path.length-1;for(r=0;r<i;r++){if(typeof a[n.path[r]]==="undefined"){a[n.path[r]]={}}a=a[n.path[r]]}switch(n.kind){case"A":d(a[n.path[r]],n.index,n.item);break;case"D":a[n.path[r]]=n.lhs;break;case"E":a[n.path[r]]=n.lhs;break;case"N":delete a[n.path[r]];break}}}function v(e,t,n){if(e&&t){var a=function(a){if(!n||n(e,t,a)){b(e,t,a)}};c(e,t,a)}}Object.defineProperties(p,{diff:{value:p,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:v,enumerable:true},applyChange:{value:b,enumerable:true},revertChange:{value:k,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(a){a.forEach(function(e){e()});a=null}return p},enumerable:true}});if(typeof module!=="undefined"&&module&&typeof exports==="object"&&exports&&module.exports===exports){module.exports=p}else{t.DeepDiff=p}}(); | ||
/*! | ||
* deep-diff-0.2.0. | ||
* Licensed under the MIT License. | ||
*/ | ||
!function(e){"use strict";var t,n,a=[];if(typeof global==="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){a.push(function(){if("undefined"!==typeof n&&t.DeepDiff===p){t.DeepDiff=n;n=e}})}function r(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function i(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function f(e,t,n){f.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}r(f,i);function l(e,t){l.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}r(l,i);function u(e,t){u.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}r(u,i);function s(e,t,n){s.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}r(s,i);function h(e,t,n){var a=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,a);return e}function c(t,n,a,r,i,p,o){i=i||[];var b=i.slice(0);if(typeof p!=="undefined"){if(r&&r(b,p)){return}b.push(p)}var d=typeof t;var k=typeof n;if(d==="undefined"){if(k!=="undefined"){a(new l(b,n))}}else if(k==="undefined"){a(new u(b,t))}else if(d!==k){a(new f(b,t,n))}else if(t instanceof Date&&n instanceof Date&&t-n!==0){a(new f(b,t,n))}else if(d==="object"&&t!==null&&n!==null){o=o||[];if(o.indexOf(t)<0){o.push(t);if(Array.isArray(t)){var v,y=t.length;for(v=0;v<t.length;v++){if(v>=n.length){a(new s(b,v,new u(e,t[v])))}else{c(t[v],n[v],a,r,b,v,o)}}while(v<n.length){a(new s(b,v,new l(e,n[v++])))}}else{var m=Object.keys(t);var g=Object.keys(n);m.forEach(function(i,f){var l=g.indexOf(i);if(l>=0){c(t[i],n[i],a,r,b,i,o);g=h(g,l)}else{c(t[i],e,a,r,b,i,o)}});g.forEach(function(t){c(e,n[t],a,r,b,t,o)})}o.length=o.length-1}}else if(t!==n){if(!(d==="number"&&isNaN(t)&&isNaN(n))){a(new f(b,t,n))}}}function p(t,n,a,r){r=r||[];c(t,n,function(e){if(e){r.push(e)}},a);return r.length?r:e}function o(e,t,n){if(n.path&&n.path.length){var a=e[t],r,i=n.path.length-1;for(r=0;r<i;r++){a=a[n.path[r]]}switch(n.kind){case"A":o(a[n.path[r]],n.index,n.item);break;case"D":delete a[n.path[r]];break;case"E":case"N":a[n.path[r]]=n.rhs;break}}else{switch(n.kind){case"A":o(e[t],n.index,n.item);break;case"D":e=h(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(e&&t&&n&&n.kind){var a=e,r=-1,i=n.path.length-1;while(++r<i){if(typeof a[n.path[r]]==="undefined"){a[n.path[r]]=typeof n.path[r]==="number"?new Array:{}}a=a[n.path[r]]}switch(n.kind){case"A":o(a[n.path[r]],n.index,n.item);break;case"D":delete a[n.path[r]];break;case"E":case"N":a[n.path[r]]=n.rhs;break}}}function d(e,t,n){if(n.path&&n.path.length){var a=e[t],r,i=n.path.length-1;for(r=0;r<i;r++){a=a[n.path[r]]}switch(n.kind){case"A":d(a[n.path[r]],n.index,n.item);break;case"D":a[n.path[r]]=n.lhs;break;case"E":a[n.path[r]]=n.lhs;break;case"N":delete a[n.path[r]];break}}else{switch(n.kind){case"A":d(e[t],n.index,n.item);break;case"D":e[t]=n.lhs;break;case"E":e[t]=n.lhs;break;case"N":e=h(e,t);break}}return e}function k(e,t,n){if(e&&t&&n&&n.kind){var a=e,r,i;i=n.path.length-1;for(r=0;r<i;r++){if(typeof a[n.path[r]]==="undefined"){a[n.path[r]]={}}a=a[n.path[r]]}switch(n.kind){case"A":d(a[n.path[r]],n.index,n.item);break;case"D":a[n.path[r]]=n.lhs;break;case"E":a[n.path[r]]=n.lhs;break;case"N":delete a[n.path[r]];break}}}function v(e,t,n){if(e&&t){var a=function(a){if(!n||n(e,t,a)){b(e,t,a)}};c(e,t,a)}}Object.defineProperties(p,{diff:{value:p,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:v,enumerable:true},applyChange:{value:b,enumerable:true},revertChange:{value:k,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(a){a.forEach(function(e){e()});a=null}return p},enumerable:true}});if(typeof module!=="undefined"&&module&&typeof exports==="object"&&exports&&module.exports===exports){module.exports=p}else{t.DeepDiff=p}}(); |
@@ -1,1 +0,5 @@ | ||
!function(e){"use strict";var t,n,i=[];if(typeof global=="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){i.push(function(){if("undefined"!==typeof n&&t.DeepDiff===h){t.DeepDiff=n;n=e}})}function r(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function f(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function a(e,t,n){a.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}r(a,f);function u(e,t){u.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}r(u,f);function l(e,t){l.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}r(l,f);function o(e,t,n){o.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}r(o,f);function s(e,t,n){var i=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,i);return e}function c(t,n,i,r,f,h){r=r||[];var p=r.slice(0);if(f){p.push(f)}var b=typeof t;var d=typeof n;if(b==="undefined"){if(d!=="undefined"){i(new u(p,n))}}else if(d==="undefined"){i(new l(p,t))}else if(b!==d){i(new a(p,t,n))}else if(t instanceof Date&&n instanceof Date&&t-n!=0){i(new a(p,t,n))}else if(b==="object"&&t!=null&&n!=null){h=h||[];if(h.indexOf(t)<0){h.push(t);if(Array.isArray(t)){var v,y=t.length,m=function(e){i(new o(p,v,e))};for(v=0;v<t.length;v++){if(v>=n.length){i(new o(p,v,new l(e,t[v])))}else{c(t[v],n[v],m,[],null,h)}}while(v<n.length){i(new o(p,v,new u(e,n[v++])))}}else{var g=Object.keys(t);var w=Object.keys(n);g.forEach(function(r){var f=w.indexOf(r);if(f>=0){c(t[r],n[r],i,p,r,h);w=s(w,f)}else{c(t[r],e,i,p,r,h)}});w.forEach(function(t){c(e,n[t],i,p,t,h)})}h.length=h.length-1}}else if(t!==n){i(new a(p,t,n))}}function h(t,n,i){i=i||[];c(t,n,function(e){if(e){i.push(e)}});return i.length?i:e}function p(e,t,n){if(n.path&&n.path.length){var i=e[t],r,f=n.path.length-1;for(r=0;r<f;r++){i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}else{switch(n.kind){case"A":p(e[t],n.index,n.item);break;case"D":e=s(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(!(n instanceof f)){throw new TypeError("[Object] change must be instanceof Diff")}if(e&&t&&n){var i=e,r,a;a=n.path.length-1;for(r=0;r<a;r++){if(typeof i[n.path[r]]==="undefined"){i[n.path[r]]={}}i=i[n.path[r]]}switch(n.kind){case"A":p(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs;break}}}function d(e,t,n){if(e&&t){var i=function(i){if(!n||n(e,t,i)){b(e,t,i)}};c(e,t,i)}}Object.defineProperties(h,{diff:{value:h,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:d,enumerable:true},applyChange:{value:b,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(i){i.forEach(function(e){e()});i=null}return h},enumerable:true}});if(typeof module!="undefined"&&module&&typeof exports=="object"&&exports&&module.exports===exports){module.exports=h}else{t.DeepDiff=h}}(); | ||
/*! | ||
* deep-diff. | ||
* Licensed under the MIT License. | ||
*/ | ||
(function(e){"use strict";var t,n,a=[];if(typeof global==="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){a.push(function(){if("undefined"!==typeof n&&t.DeepDiff===p){t.DeepDiff=n;n=e}})}function r(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function i(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function f(e,t,n){f.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}r(f,i);function l(e,t){l.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}r(l,i);function u(e,t){u.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}r(u,i);function s(e,t,n){s.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}r(s,i);function h(e,t,n){var a=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,a);return e}function c(t,n,a,r,i,p,o){i=i||[];var b=i.slice(0);if(typeof p!=="undefined"){if(r&&r(b,p)){return}b.push(p)}var d=typeof t;var k=typeof n;if(d==="undefined"){if(k!=="undefined"){a(new l(b,n))}}else if(k==="undefined"){a(new u(b,t))}else if(d!==k){a(new f(b,t,n))}else if(t instanceof Date&&n instanceof Date&&t-n!==0){a(new f(b,t,n))}else if(d==="object"&&t!==null&&n!==null){o=o||[];if(o.indexOf(t)<0){o.push(t);if(Array.isArray(t)){var v,y=t.length;for(v=0;v<t.length;v++){if(v>=n.length){a(new s(b,v,new u(e,t[v])))}else{c(t[v],n[v],a,r,b,v,o)}}while(v<n.length){a(new s(b,v,new l(e,n[v++])))}}else{var m=Object.keys(t);var g=Object.keys(n);m.forEach(function(i,f){var l=g.indexOf(i);if(l>=0){c(t[i],n[i],a,r,b,i,o);g=h(g,l)}else{c(t[i],e,a,r,b,i,o)}});g.forEach(function(t){c(e,n[t],a,r,b,t,o)})}o.length=o.length-1}}else if(t!==n){if(!(d==="number"&&isNaN(t)&&isNaN(n))){a(new f(b,t,n))}}}function p(t,n,a,r){r=r||[];c(t,n,function(e){if(e){r.push(e)}},a);return r.length?r:e}function o(e,t,n){if(n.path&&n.path.length){var a=e[t],r,i=n.path.length-1;for(r=0;r<i;r++){a=a[n.path[r]]}switch(n.kind){case"A":o(a[n.path[r]],n.index,n.item);break;case"D":delete a[n.path[r]];break;case"E":case"N":a[n.path[r]]=n.rhs;break}}else{switch(n.kind){case"A":o(e[t],n.index,n.item);break;case"D":e=h(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function b(e,t,n){if(e&&t&&n&&n.kind){var a=e,r=-1,i=n.path.length-1;while(++r<i){if(typeof a[n.path[r]]==="undefined"){a[n.path[r]]=typeof n.path[r]==="number"?new Array:{}}a=a[n.path[r]]}switch(n.kind){case"A":o(a[n.path[r]],n.index,n.item);break;case"D":delete a[n.path[r]];break;case"E":case"N":a[n.path[r]]=n.rhs;break}}}function d(e,t,n){if(n.path&&n.path.length){var a=e[t],r,i=n.path.length-1;for(r=0;r<i;r++){a=a[n.path[r]]}switch(n.kind){case"A":d(a[n.path[r]],n.index,n.item);break;case"D":a[n.path[r]]=n.lhs;break;case"E":a[n.path[r]]=n.lhs;break;case"N":delete a[n.path[r]];break}}else{switch(n.kind){case"A":d(e[t],n.index,n.item);break;case"D":e[t]=n.lhs;break;case"E":e[t]=n.lhs;break;case"N":e=h(e,t);break}}return e}function k(e,t,n){if(e&&t&&n&&n.kind){var a=e,r,i;i=n.path.length-1;for(r=0;r<i;r++){if(typeof a[n.path[r]]==="undefined"){a[n.path[r]]={}}a=a[n.path[r]]}switch(n.kind){case"A":d(a[n.path[r]],n.index,n.item);break;case"D":a[n.path[r]]=n.lhs;break;case"E":a[n.path[r]]=n.lhs;break;case"N":delete a[n.path[r]];break}}}function v(e,t,n){if(e&&t){var a=function(a){if(!n||n(e,t,a)){b(e,t,a)}};c(e,t,a)}}Object.defineProperties(p,{diff:{value:p,enumerable:true},observableDiff:{value:c,enumerable:true},applyDiff:{value:v,enumerable:true},applyChange:{value:b,enumerable:true},revertChange:{value:k,enumerable:true},isConflict:{get:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(a){a.forEach(function(e){e()});a=null}return p},enumerable:true}});if(typeof module!=="undefined"&&module&&typeof exports==="object"&&exports&&module.exports===exports){module.exports=p}else{t.DeepDiff=p}})(); |
@@ -150,3 +150,3 @@ /*global it: false, describe: false, DeepDiffConflict: false*/ | ||
if (executingInBrowser) { | ||
expect(DeepDiff.isConflict).to.be.ok(); | ||
expect(DeepDiff.isConflict()).to.be.ok(); | ||
} | ||
@@ -158,3 +158,3 @@ }); | ||
if (executingInBrowser) { | ||
expect(DeepDiff.isConflict).to.be.ok(); | ||
expect(DeepDiff.isConflict()).to.be.ok(); | ||
var another = DeepDiff.noConflict(); | ||
@@ -161,0 +161,0 @@ expect(another).to.be(deep); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
524467
26
3596