Created
September 13, 2019 18:53
-
-
Save jelkand/a2d2bf1fc0076764b26b7bac1cede53a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const attachProxy = (target) => { | |
const handler = { | |
set(obj, prop, value) { | |
console.log('setting value of prop:', prop, 'to value:', value, 'obj', obj); | |
console.trace(); | |
return Reflect.set(...arguments); | |
} | |
}; | |
return new Proxy(target, handler); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment