Add Object.freeze on private enums

Improve code readability
This commit is contained in:
2018-07-09 10:27:12 -07:00
parent c3a63ff8b7
commit 215708014c
55 changed files with 288 additions and 327 deletions

View File

@ -19,8 +19,7 @@ BufferSegment.prototype.toString = function() {
};
BufferSegment.prototype.toBuffer = function() {
if (this.offset === 0 && this.count === this.buffer.length)
return this.buffer;
if (this.offset === 0 && this.count === this.buffer.length) return this.buffer;
return this.buffer.slice(this.offset, this.offset + this.count);
};