I ran into issues with a JavaScript bundler (vite) and the resulting package not working in the browser due to global being undefined. globalThis is the now widely supported standard way to access the global object. This PR changes the browser impl to use globalThis instead of global.
I see that this was closed before in #24
If people are looking for a workaround for bundlers that don't inject global, I republished the module with this change as @frando/randombytes for my own use.
I ran into issues with a JavaScript bundler (vite) and the resulting package not working in the browser due to
global
being undefined.globalThis
is the now widely supported standard way to access the global object. This PR changes the browser impl to useglobalThis
instead ofglobal
.