We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8067980 commit 7236c49Copy full SHA for 7236c49
lib/to-array-buffer.js
@@ -2,7 +2,7 @@
2
3
module.exports = function (base64Data) {
4
var isBrowser = typeof window !== 'undefined' && typeof window.atob === 'function'
5
- var binary = isBrowser ? window.atob(base64Data) : new Buffer(base64Data, 'base64').toString('binary')
+ var binary = isBrowser ? window.atob(base64Data) : Buffer.from(base64Data, 'base64').toString('binary')
6
var bytes = new Uint8Array(binary.length)
7
8
for (var i = 0; i < binary.length; ++i) {
0 commit comments