4:28pm 26th September 2017
So basically what you want to do is to intercept/trap assignments to arbitrary properties on some object. In your case, the global object.
If this is meant for testing (as opposed to production code), a
setInterval with some listener that periodically enumerates all properties of the global object and logs a warning if one was added might be good enough for you.