Closed perry-mitchell closed 6 years ago
I don't think you'd need to add Buffer
to the global namespace. Bundlers like browserify
automatically add the buffer
package to the bundle when they detect usage of Buffer
. For non-browserify bundlers, you might need to configure them to emulate a node-environment to get the correct behavior (e.g. for Rollup, you need rollup-plugin-node-builtins
).
I was looking at
buffer
and this on npm and realised that I'd need to haveBuffer
on the global namespace for it to work with this library. Would you be open to allowing a 3rd parameter to allow for the optional overriding of theBuffer
keyword?This would allow me to use this library in a way that doesn't pollute global.