I'm looking to use node.js to do some testing of existing, browser-based code. Some of the code I'm looking to test looks into the global scope for other functions. (For various reasons, I cannot change this code.)
It appears that I can assign to global.foo to make foo globally available. This would let me load up the appropriate libraries into the appropriate places. It seems there are two varieties of global object in node: global, and GLOBAL.
What is the difference between global and GLOBAL?
(Of course, one cannot Google this. The official node documentation does not seem to mention GLOBAL, but it exists in the runtime, and is mentioned around the web.)
They appear to just be aliases of each other:
console.log(global === GLOBAL); // true