]> zoso.dev Git - buffer.git/commitdiff
Revert "fix toJSON() method"
authorFeross Aboukhadijeh <feross@feross.org>
Mon, 18 Nov 2013 14:59:20 +0000 (06:59 -0800)
committerFeross Aboukhadijeh <feross@feross.org>
Mon, 18 Nov 2013 14:59:20 +0000 (06:59 -0800)
This reverts commit d846347693ef8e9146e0a32ba8993fae126c4bbf.

index.js

index b86e93f02265a68945a858c96e4c41a10a462fc8..8656bd77d0ed996ae72becc82941cea3ac1f4d21 100644 (file)
--- 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)