(node:73186) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
This commit is contained in:
parent
b118fbbc3b
commit
a4e12f0d75
|
@ -40,7 +40,7 @@ function replaceAll(string, find, replace) {
|
|||
function stringSrc(filename, string) {
|
||||
let src = require('stream').Readable({objectMode: true});
|
||||
src._read = function () {
|
||||
this.push(new gutil.File({cwd: '', base: '', path: filename, contents: new Buffer(string)}));
|
||||
this.push(new gutil.File({cwd: '', base: '', path: filename, contents: Buffer.from(string)}));
|
||||
this.push(null);
|
||||
};
|
||||
return src;
|
||||
|
|
Loading…
Reference in New Issue