Last active
September 20, 2017 23:27
-
-
Save dounan/d4c0b632ca5749f0cc81833c6f3af1f2 to your computer and use it in GitHub Desktop.
Mutation detection via proxy example (with stack trace)
This file contains 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
function foo(obj) { | |
bar(obj); | |
} | |
function bar(obj) { | |
obj.value = "oops"; | |
} | |
const obj = {}; | |
const wrappedObj = wrap(obj); | |
foo(wrappedObj); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment