diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/convert-source-map/index.js | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) |
update packages
Diffstat (limited to 'node_modules/convert-source-map/index.js')
-rw-r--r-- | node_modules/convert-source-map/index.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/node_modules/convert-source-map/index.js b/node_modules/convert-source-map/index.js index 2d08f1e2b..3aeae1048 100644 --- a/node_modules/convert-source-map/index.js +++ b/node_modules/convert-source-map/index.js @@ -1,6 +1,7 @@ 'use strict'; var fs = require('fs'); var path = require('path'); +var SafeBuffer = require('safe-buffer'); Object.defineProperty(exports, 'commentRegex', { get: function getCommentRegex () { @@ -17,7 +18,7 @@ Object.defineProperty(exports, 'mapFileCommentRegex', { function decodeBase64(base64) { - return new Buffer(base64, 'base64').toString(); + return SafeBuffer.Buffer.from(base64, 'base64').toString(); } function stripComment(sm) { @@ -57,7 +58,7 @@ Converter.prototype.toJSON = function (space) { Converter.prototype.toBase64 = function () { var json = this.toJSON(); - return new Buffer(json).toString('base64'); + return SafeBuffer.Buffer.from(json, 'utf8').toString('base64'); }; Converter.prototype.toComment = function (options) { |