Using Sweet.js macros to get object property change lists for methods inside of a prototype.
Must be compiled with SweetJS. Install via npm:
npm install -g sweet.js
Run make:
make
node app
Turns this:
Model.prototype.test = function () {
this_(x.y.z = 20);
}
into this:
Model.prototype.test = function () {
this._changed.x = this._changed.x || {};
this._changed.x.y = this._changed.x.y || {};
this._changed.x.y.z = 20;
this.x.y.z = 20;
};