Replace new Buffer() constructor calls (#69)

This commit is contained in:
Dave Holoway
2019-08-18 14:53:54 +01:00
committed by GitHub
parent d1fd889433
commit 1a00cdb291

View File

@@ -627,9 +627,9 @@ exports.dumparr = function (arr, offset, count) {
} }
exports.btoa = function (arr) { exports.btoa = function (arr) {
return new Buffer(arr, 'binary').toString('base64'); return Buffer.from(arr, 'binary').toString('base64');
} }
exports.atob = function (base64) { exports.atob = function (base64) {
return new Buffer(base64, 'base64').toString('binary'); return Buffer.from(base64, 'base64').toString('binary');
} }