Skip to content

Commit

Permalink
Fix Buffer warning
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Oct 21, 2019
1 parent cc460b6 commit e1e4045
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sourceMaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function getGeneratedPosition(str, source) {

function defineSourceMap(filename) {
var string = '{"version":3,"sources":["' + filename + '"],"names":[],"mappings":"AAAA,E,CAAK,S,CACL,E,CAAK,a,CAAgB,U","file":"' + filename + '","sourcesContent":[' + JSON.stringify(css) + ']}';
var base64 = new Buffer(string, 'utf8').toString('base64');
var base64 = Buffer.from(string, 'utf8').toString('base64');
var inline = '/*# sourceMappingURL=data:application/json;base64,' + base64 + ' */';

return {
Expand All @@ -61,7 +61,7 @@ function extractSourceMap(source) {
var m = source.match(/\/\*# sourceMappingURL=data:application\/json;base64,(.+) \*\//);

if (m) {
return new Buffer(m[1], 'base64').toString();
return Buffer.from(m[1], 'base64').toString();
}
}

Expand Down

0 comments on commit e1e4045

Please sign in to comment.