diff --git a/lib/buffer.js b/lib/buffer.js index 797d4d67e6b9..e1fcdb4044bb 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -7,6 +7,10 @@ function toHex (n) { return n.toString(16); } +Buffer.isBuffer = function (b) { + return b instanceof Buffer; +}; + Buffer.prototype.inspect = function () { var s = "