Hey, @achingbrain recently it was discovered that some crypto wallets forcefully polypill globalThis.Buffer with some garbage Buffer implementations. uint8arrays uses globalThis.Buffer quite extensively. I guess, the intent is to use native Node.js Buffer, not some polyfill. How do you think about moving Buffer-related code behind conditional exports?
Say, you could have #alloc which resolves to ./buffer-alloc.js when node-imported, and ./uint8array-alloc.js by default.
Also, node.js Buffer could be found in node:buffer on Bun and Node.js, which makes the code a bit simpler to read, and it definitely avoids implications of globalThis pollution.