Comparing version 2.0.0 to 2.0.1
@@ -10,9 +10,9 @@ import { decode } from "./decode.js"; | ||
const result = []; | ||
let index = 0; | ||
while (buffer.length > 0) { | ||
const [num, bytesRead] = decode(buffer); | ||
result[index++] = num; | ||
buffer = buffer.subarray(bytesRead); | ||
let offset = 0; | ||
while (offset < buffer.length) { | ||
const [num, bytesRead] = decode(buffer, offset); | ||
result.push(num); | ||
offset += bytesRead; | ||
} | ||
return result; | ||
} |
{ | ||
"name": "varintes", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Unsigned Varint encoding and decoding, exposed as ESModule", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
9294