| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1445e28 commit 02dbae6
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -521,12 +521,10 @@ Buffer.prototype.equals = function equals(b) { | |||
| 521 | 521 | Buffer.prototype[internalUtil.customInspectSymbol] = function inspect() { | |
| 522 | 522 | var str = ''; | |
| 523 | 523 | var max = exports.INSPECT_MAX_BYTES; | |
| 524 | - if (this.length > 0) { | ||
| 525 | - str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); | ||
| 526 | - if (this.length > max) | ||
| 527 | - str += ' ... '; | ||
| 528 | - } | ||
| 529 | - return '<' + this.constructor.name + ' ' + str + '>'; | ||
| 524 | + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim(); | ||
| 525 | + if (this.length > max) | ||
| 526 | + str += ' ... '; | ||
| 527 | + return `<${this.constructor.name} ${str}>`; | ||
| 530 | 528 | }; | |
| 531 | 529 | Buffer.prototype.inspect = Buffer.prototype[internalUtil.customInspectSymbol]; | |
| 532 | 530 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments