Request: Allow opting into using https://github.com/feross/buffer to provide `Buffer` instead of Node's built-in `Buffer`
-
I'm submitting a ... [ ] bug report [x] feature request [ ] question about the decisions made in the repository [ ] question about how to use this project [ ] documentation/syntax error report
-
Summary
I have a codegen tool that is converting XML into TypeScript where the struct definitions simply call new Struct()...compile(). This works perfectly for the case where my code is in a Node environment. However, it does not work as expected in the browser, and the reason is the use of Buffer. Now, there may be other dependencies, but I'm not concerned about iconv etc.
There is a buffer-compatible library here. I'm wondering if it would be feasible for you to allow replacing the Node Buffer class with the one exported from this library as an option.
- Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
In the near future I will have free time and I will be able to deal with this issue. Good offer, thanks.
the commit 7a7ea4dc8afe83454deab013dd104bbeb6a28253 solved the issue.