Skip to content

Instantly share code, notes, and snippets.



Last active Sep 6, 2017
What would you like to do?
Introspectable js scope
// assuming b is a local
// rewrite
function(a) { return a + b; }
// to
Object.defineProperty(function(a) { return a + b; }, "$scope", {value: function() { return {"b": b}; }})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment