fuss = {}; fuss.PropertyMemory = function(trackList, target){ this.target = target || this this.tracking = {} this.trackList = trackList; this.read(); } fuss.PropertyMemory.prototype.read = function read(){ var i, prop, oldValues = {}; for(i = 0; i < this.trackList.length; i++){ prop = this.trackList[i] if(this.tracking[prop] !== this.target[prop]){ oldValues[prop] = this.tracking[prop]; } this.tracking[prop] = this.target[prop]; } return oldValues; } function Something(){ this.who = 'what'; this.how = 'when'; this.say = 'you there'; this.then = 'yeah'; this.pos = { x: 0, y: 0 } this.pm = new fuss.PropertyMemory(['who', 'how', 'say', 'then', 'pos'], this); } var s = new Something(); s.how = 'duh duh duh'; s.say = 'I did not'; s.pos = { x: 0, y: 10 }; console.log(s.pm.read(), s); console.log(s.pm.read(), s);