Skip to content

Instantly share code, notes, and snippets.

@dounan
Last active September 20, 2017 23:27
Show Gist options
  • Save dounan/d4c0b632ca5749f0cc81833c6f3af1f2 to your computer and use it in GitHub Desktop.
Save dounan/d4c0b632ca5749f0cc81833c6f3af1f2 to your computer and use it in GitHub Desktop.
Mutation detection via proxy example (with stack trace)
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