Seems like a good idea to add outside of meteor projects too. Maybe an extension for Chrome dev tools that lists global variables loaded per page?
for(var i in window){ if(typeof window[i]=="object"){console.log(i);} }
But I think op wanted variables server side as well
Also, as simple as this might be, making it a de-facto standard (on meteor) would be a good thing since it would be a tool that we can count on, all the time. There are too many browsers IMO to make an extension a viable option.
Whitelisting variables would be good as well ; that way we do not get alerted if it is something we expect to be global.
Meteor.setInterval(function(){ for(var i in global){ if(MyVars.find({name:i}).count()==0){ MyVars.insert({name:i}); console.log("New Public Variable: ", i); } } }, 5000);
Thanks for the fun challenge :-)