smart-buffer
Advanced tools
Comparing version 1.0.11 to 1.0.13
@@ -261,3 +261,3 @@ var SmartBuffer = (function () { | ||
this.writeString(value, offset, encoding); | ||
this.writeUInt8(0x00); | ||
this.writeUInt8(0x00, (typeof offset === 'number' ? offset + value.length : this._writeOffset)); | ||
return this; | ||
@@ -287,7 +287,5 @@ }; | ||
SmartBuffer.prototype.writeBufferNT = function (value, offset) { | ||
var len = value.length; | ||
this._ensureWritable(len, offset); | ||
value.copy(this.buff, typeof offset === 'number' ? offset : this._writeOffset); | ||
this.buff[(typeof offset === 'number' ? offset : this._writeOffset) + len] = 0x00; | ||
this._writeOffset += len + 1; | ||
this.writeBuffer(value, offset); | ||
this.writeUInt8(0x00, (typeof offset === 'number' ? offset + value.length : this._writeOffset)); | ||
return this; | ||
@@ -294,0 +292,0 @@ }; |
{ | ||
"name": "smart-buffer", | ||
"version": "1.0.11", | ||
"version": "1.0.13", | ||
"description": "A smarter Buffer that keeps track of its own read and write positions while growing endlessly.", | ||
@@ -31,6 +31,6 @@ "main": "lib/smart-buffer.js", | ||
"devDependencies": { | ||
"chai": "^2.2.0", | ||
"coveralls": "^2.11.9", | ||
"chai": "^3.5.0", | ||
"coveralls": "^2.11.15", | ||
"istanbul": "^0.4.3", | ||
"mocha": "^2.2.3", | ||
"mocha": "^3.2.0", | ||
"mocha-lcov-reporter": "^1.2.0" | ||
@@ -37,0 +37,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51869
942