Recently someone did a PR where he put something on the global
object. Something like
global.foo = 'bar';
This doesn't feel like a good thing to do. You might accidentally override something. Also it makes it very hard to track where the global variable was set. I don't believe I actually ever used the global
keyword in my code.
It's the same thing for window
in browser environments.
Just wanted to bring up the discussion as I might be wrong though. If not, should we forbid the use of global entirely? Or only setting values?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too