- Migrated all pages from Next.js to Astro - Added PDPA-compliant Privacy Policy (Thai) - Added PDPA-compliant Terms & Conditions (Thai) - Added Cookie Policy with disclosure (Thai) - Implemented cookie consent banner (client-side) - Integrated Umami Analytics placeholder - Blog system with 3 posts - Optimized Docker configuration for production - Static site build (184KB, 11 pages) - Ready for Easypanel deployment Backup: /Users/kunthawatgreethong/Gitea/dealplustech-backup-nextjs-20260309.tar.gz
42 lines
905 B
JavaScript
42 lines
905 B
JavaScript
var util = require('util')
|
|
, deep = require('..')
|
|
;
|
|
|
|
var lhs = {
|
|
name: 'my object',
|
|
description: 'it\'s an object!',
|
|
details: {
|
|
it: 'has',
|
|
an: 'array',
|
|
with: ['a', 'few', 'elements']
|
|
}
|
|
};
|
|
|
|
var rhs = {
|
|
name: 'updated object',
|
|
description: 'it\'s an object!',
|
|
details: {
|
|
it: 'has',
|
|
an: 'array',
|
|
with: ['a', 'few', 'more', 'elements', { than: 'before' }]
|
|
}
|
|
};
|
|
|
|
var differences = deep.diff(lhs, rhs);
|
|
|
|
// Print the differences to the console...
|
|
util.log(util.inspect(differences, false, 99));
|
|
|
|
deep.observableDiff(lhs, rhs, function (d) {
|
|
// Apply all changes except those to the 'name' property...
|
|
if (d.path.length !== 1 || d.path.join('.') !== 'name') {
|
|
deep.applyChange(lhs, rhs, d);
|
|
}
|
|
}, function (path, key) {
|
|
var p = (path && path.length) ? path.join('/') : '<no-path>'
|
|
util.log('prefilter: path = ' + p + ' key = ' + key);
|
|
}
|
|
);
|
|
|
|
console.log(util.inspect(lhs, false, 99));
|