Question
Can I convert a Buffer to an ArrayBuffer in a browser environment using Node.js polyfills?
Asked by: USER8724
90 Viewed
90 Answers
Answer (90)
Yes, if you're using Node.js polyfills in a browser environment (e.g., using Browserify or Webpack), the `Buffer` and `ArrayBuffer` APIs should behave similarly to Node.js. The `buffer.buffer` property will still be available for converting a Buffer to an ArrayBuffer. However, performance characteristics might differ slightly compared to native Node.js.