|
|
@ -22,7 +22,7 @@ |
|
|
|
var SlowBuffer = process.binding('buffer').SlowBuffer; |
|
|
|
var assert = require('assert'); |
|
|
|
|
|
|
|
var INSPECT_MAX_BYTES = 50; |
|
|
|
exports.INSPECT_MAX_BYTES = 50; |
|
|
|
|
|
|
|
|
|
|
|
function toHex(n) { |
|
|
@ -36,7 +36,7 @@ SlowBuffer.prototype.inspect = function() { |
|
|
|
len = this.length; |
|
|
|
for (var i = 0; i < len; i++) { |
|
|
|
out[i] = toHex(this[i]); |
|
|
|
if (i == INSPECT_MAX_BYTES) { |
|
|
|
if (i == exports.INSPECT_MAX_BYTES) { |
|
|
|
out[i + 1] = '...'; |
|
|
|
break; |
|
|
|
} |
|
|
@ -287,7 +287,7 @@ Buffer.prototype.inspect = function inspect() { |
|
|
|
|
|
|
|
for (var i = 0; i < len; i++) { |
|
|
|
out[i] = toHex(this.parent[i + this.offset]); |
|
|
|
if (i == INSPECT_MAX_BYTES) { |
|
|
|
if (i == exports.INSPECT_MAX_BYTES) { |
|
|
|
out[i + 1] = '...'; |
|
|
|
break; |
|
|
|
} |
|
|
|