From: Сковорода Никита Андреевич Date: Thu, 22 Feb 2018 16:29:45 +0000 (+0300) Subject: new Buffer -> Buffer.from X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=d9784b5c95e84eb6f19e32c7e170f43ce0dcd006;p=buffer.git new Buffer -> Buffer.from This is benign due to the module nature, but just for consistency. --- diff --git a/index.js b/index.js index fa57ec4..06b36e7 100644 --- a/index.js +++ b/index.js @@ -1608,7 +1608,7 @@ Buffer.prototype.fill = function fill (val, start, end, encoding) { } else { var bytes = Buffer.isBuffer(val) ? val - : new Buffer(val, encoding) + : Buffer.from(val, encoding) var len = bytes.length if (len === 0) { throw new TypeError('The value "' + val +