diff --git a/index.js b/index.js index df74d61..833a484 100644 --- a/index.js +++ b/index.js @@ -91,7 +91,7 @@ Generator.prototype.addSourceContent = function (sourceFile, sourcesContent) { */ Generator.prototype.base64Encode = function () { var map = this.toString(); - return new Buffer(map).toString('base64'); + return Buffer.from(map).toString('base64'); }; /** diff --git a/test/inline-source-map.js b/test/inline-source-map.js index a6b9f5e..5fe60a4 100644 --- a/test/inline-source-map.js +++ b/test/inline-source-map.js @@ -15,7 +15,7 @@ var bar = '' + function bar () { } function decode(base64) { - return new Buffer(base64, 'base64').toString(); + return Buffer.from(base64, 'base64').toString(); } function inspect(obj, depth) { diff --git a/test/source-content.js b/test/source-content.js index d18997d..cc0b749 100644 --- a/test/source-content.js +++ b/test/source-content.js @@ -15,7 +15,7 @@ var bar = '' + function bar () { } function decode(base64) { - return new Buffer(base64, 'base64').toString(); + return Buffer.from(base64, 'base64').toString(); } function inspect(obj, depth) {