You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • That looks great! While dump does work, it does dump everything. You could just print Object.keys(global)?

    Good point about eval(undefined). Does this actually fail, or is it that accessing a variable that doesn't exist is causing a reference error?

    I'm not sure if you found this, but you might be able to make get return a function, but with a valueOf method (https://developer.mozilla.org/en-US/docs­/Web/JavaScript/Reference/Global_Objects­/Object/valueOf) that got the value rather than executing a function? It seems that querying the type might be preferable anyway though.

About

Avatar for Gordon @Gordon started