reactive-replica
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -7,4 +7,2 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
@@ -261,10 +259,16 @@ | ||
} | ||
//equality determination policy for objects wasn't established yet, but let's put responsibility to handle object's changes to nested Places: | ||
//okey, let application choose what change is, since arrays are also objects: | ||
/*//equality determination policy for objects wasn't established yet, but let's put responsibility to handle object's changes to nested Places: | ||
//be careful with null values (since those are 'object's) - don't let them sneak into model and/or server-side: | ||
else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== 'object' || (typeof old === 'undefined' ? 'undefined' : _typeof(old)) !== 'object') { | ||
if (value !== old) { | ||
onChange(place, value, old); | ||
} | ||
else if ( typeof value !== 'object' || typeof old !== 'object' ) | ||
{ | ||
if ( value !== old ) | ||
{ | ||
onChange( place, value, old ) | ||
} | ||
//otherwise both are objects - won't change ... | ||
} | ||
//otherwise both are objects - won't change ...*/ | ||
else if (value != old) { | ||
onChange(place, value, old); | ||
} | ||
@@ -271,0 +275,0 @@ //we don't care about model's fields which has no attached Places against them: |
@@ -275,3 +275,4 @@ | ||
} | ||
//equality determination policy for objects wasn't established yet, but let's put responsibility to handle object's changes to nested Places: | ||
//okey, let application choose what change is, since arrays are also objects: | ||
/*//equality determination policy for objects wasn't established yet, but let's put responsibility to handle object's changes to nested Places: | ||
//be careful with null values (since those are 'object's) - don't let them sneak into model and/or server-side: | ||
@@ -285,3 +286,7 @@ else if ( typeof value !== 'object' || typeof old !== 'object' ) | ||
} | ||
//otherwise both are objects - won't change ... | ||
//otherwise both are objects - won't change ...*/ | ||
else if ( value != old ) | ||
{ | ||
onChange( place, value, old ) | ||
} | ||
@@ -288,0 +293,0 @@ //we don't care about model's fields which has no attached Places against them: |
{ | ||
"name": "reactive-replica", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Helps structure logic around model changes, i.e. utilize reactive style.", | ||
@@ -8,3 +8,3 @@ "main": "dist/index.js", | ||
"test": "mocha ./test --compilers js:babel-register", | ||
"build": "babel ./index.js -d ./dist" | ||
"build": "babel ./index.js -d ./dist && npm test" | ||
}, | ||
@@ -11,0 +11,0 @@ "repository": { |
55001
1616