const proxy = new Proxy(obj, { set(target, property, value, receiver) { console.log(`setting ${property} to ${value}`) return Reflect.set(target, property, value, receiver); }, get(target, property, receiver) { // Just do the default behavior return Reflect.get(target, property, receiver); } }); proxy.secret = 'SUPER SECRET'; // => setting secret to SUPER SECRET console.log(obj.foo); // => bar