Skip to content

Instantly share code, notes, and snippets.

@khadorkin
Created December 28, 2014 14:29
Show Gist options
  • Save khadorkin/446d10bb805b11d3f5ae to your computer and use it in GitHub Desktop.
Save khadorkin/446d10bb805b11d3f5ae to your computer and use it in GitHub Desktop.
Dev tools snippet
var watchMe = {};
Object.observe(watchMe, function(options) {
options.forEach(function(option) {
var groupName = option.name + ' changed';
console.groupCollapsed(groupName);
console.log('Old value: ', option.oldValue);
console.log('New value: ', option.object[option.name]);
console.groupEnd(groupName);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment