Skip to content

Commit 7236c49

Browse files
committed
fix(to-array-buffer.js): replace deprecated method
1 parent 8067980 commit 7236c49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/to-array-buffer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module.exports = function (base64Data) {
44
var isBrowser = typeof window !== 'undefined' && typeof window.atob === 'function'
5-
var binary = isBrowser ? window.atob(base64Data) : new Buffer(base64Data, 'base64').toString('binary')
5+
var binary = isBrowser ? window.atob(base64Data) : Buffer.from(base64Data, 'base64').toString('binary')
66
var bytes = new Uint8Array(binary.length)
77

88
for (var i = 0; i < binary.length; ++i) {

0 commit comments

Comments
 (0)