Comparing version 0.0.2 to 0.0.3
12
index.js
@@ -61,5 +61,13 @@ var internals = {}; | ||
//The range of the first byte is [0x80, 0xb7] | ||
var length = firstByte - 0x7f; | ||
var length = firstByte - 0x7f, | ||
data; | ||
//set 0x80 null to 0 | ||
if(firstByte === 0x80){ | ||
data = new Buffer([0]); | ||
}else{ | ||
data = input.slice(1, length); | ||
} | ||
return { | ||
data: input.slice(1, length), | ||
data: data, | ||
remainder: input.slice(length) | ||
@@ -66,0 +74,0 @@ }; |
{ | ||
"name": "rlp", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Recursive Length Prefix Encoding Module", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
30175
266