Much cleaner to use that polluting the global scope. Symbol.for() will give the same result no matter what version of the library is loaded, or if was transpiled.
Additionally we might be able to allow parallel hooks to run by making the first call be globally exclusive, then when the library calls the first time, it receives back a unique Symbol that it uses for each subsequent call, which means the global lock can be released.
Much cleaner to use that polluting the global scope. Symbol.for() will give the same result no matter what version of the library is loaded, or if was transpiled.
Additionally we might be able to allow parallel hooks to run by making the first call be globally exclusive, then when the library calls the first time, it receives back a unique Symbol that it uses for each subsequent call, which means the global lock can be released.