From: Feross Aboukhadijeh Date: Mon, 18 Nov 2013 14:59:20 +0000 (-0800) Subject: Revert "fix toJSON() method" X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=37a71d9227d2b2294434a6efa92285c4ab56b71e;p=buffer.git Revert "fix toJSON() method" This reverts commit d846347693ef8e9146e0a32ba8993fae126c4bbf. --- diff --git a/index.js b/index.js index b86e93f..8656bd7 100644 --- a/index.js +++ b/index.js @@ -262,10 +262,7 @@ function BufferToString (encoding, start, end) { } function BufferToJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this, 0) - } + return Array.prototype.slice.call(this, 0) } // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)