Comparing version 0.0.13 to 0.0.14
@@ -8,10 +8,3 @@ "use strict"; | ||
} | ||
input = input.reverse(); | ||
const Nibble_To_Char_Map = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']; | ||
let s = ''; | ||
for (const byte of input) { | ||
s += Nibble_To_Char_Map[byte >> 4]; | ||
s += Nibble_To_Char_Map[byte & 0x0F]; | ||
} | ||
return BigInt(s); | ||
return BigInt(GeneratorUtils.bufferToUint(input)); | ||
} | ||
@@ -62,13 +55,3 @@ static readUint32At(bytes, index) { | ||
static bigIntToBuffer(input) { | ||
const hex = input.toString(16).padStart(16, '0'); | ||
const len = hex.length / 2; | ||
const uint8 = new Uint8Array(len); | ||
let i = 0; | ||
let j = 0; | ||
while (i < len) { | ||
uint8[i] = parseInt(hex.slice(j, j + 2), 16); | ||
i += 1; | ||
j += 2; | ||
} | ||
return uint8; | ||
return GeneratorUtils.uintToBuffer(Number(input), 8); | ||
} | ||
@@ -75,0 +58,0 @@ static concatTypedArrays(array1, array2) { |
{ | ||
"name": "catbuffer", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "NEM Catbuffer builders", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
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
775650
9483