Replace deprecated new Buffer(string) constructor with Buffer.from(string)

This commit is contained in:
Abhimanyu Vashisht 2018-05-20 19:48:54 +05:30
parent 7ba50448fd
commit 58612f869a

View File

@ -124,7 +124,7 @@ function createStringSource(filename, content) {
source._read = function () { source._read = function () {
this.push(new Vinyl({ this.push(new Vinyl({
path: filename, path: filename,
contents: new Buffer(content), contents: Buffer.from(content),
})); }));
this.push(null); this.push(null);
}; };