mirror of https://github.com/lukechilds/node.git
Ryan Dahl
15 years ago
8 changed files with 36 additions and 18 deletions
@ -0,0 +1,20 @@ |
|||||
|
var Buffer = process.binding('buffer').Buffer; |
||||
|
|
||||
|
exports.Buffer = Buffer; |
||||
|
|
||||
|
Buffer.prototype.toString = function () { |
||||
|
return this.utf8Slice(0, this.length); |
||||
|
}; |
||||
|
|
||||
|
Buffer.prototype.toJSON = function () { |
||||
|
return this.utf8Slice(0, this.length); |
||||
|
/* |
||||
|
var s = ""; |
||||
|
for (var i = 0; i < this.length; i++) { |
||||
|
s += this[i].toString(16) + " "; |
||||
|
} |
||||
|
return s; |
||||
|
*/ |
||||
|
}; |
||||
|
|
||||
|
|
Loading…
Reference in new issue