betal-fe 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/betal-fe.js +12 -4
- package/package.json +1 -1
package/dist/betal-fe.js
CHANGED
|
@@ -385,12 +385,20 @@ function areNodesEqual(nodeOne, nodeTwo) {
|
|
|
385
385
|
function objectsDiff(oldObj, newObj) {
|
|
386
386
|
const oldKeys = Object.keys(oldObj);
|
|
387
387
|
const newKeys = Object.keys(newObj);
|
|
388
|
+
const added = [];
|
|
389
|
+
const updated = [];
|
|
390
|
+
newKeys.forEach(key => {
|
|
391
|
+
if (!(key in oldObj)) {
|
|
392
|
+
added.push(key);
|
|
393
|
+
}
|
|
394
|
+
if (key in oldObj && oldObj[key] !== newObj[key]) {
|
|
395
|
+
updated.push(key);
|
|
396
|
+
}
|
|
397
|
+
});
|
|
388
398
|
return {
|
|
389
|
-
added
|
|
399
|
+
added,
|
|
390
400
|
removed: oldKeys.filter((key) => !(key in newObj)),
|
|
391
|
-
updated
|
|
392
|
-
(key) => key in oldObj && oldObj[key] !== newObj[key]
|
|
393
|
-
),
|
|
401
|
+
updated,
|
|
394
402
|
};
|
|
395
403
|
}
|
|
396
404
|
|