avancement planning

This commit is contained in:
2026-05-26 11:58:39 +02:00
parent 619a2b240a
commit 150b97cd2e
4892 changed files with 99214 additions and 429382 deletions
+6 -1
View File
@@ -212,7 +212,12 @@ function readKey(buffer, start, end, inSequence) {
let size = end - position;
let lowInt;
if (size > 4) {
lowInt = dataView.getInt32(position + 4);
lowInt = position + 8 <= buffer.length ? dataView.getInt32(position + 4) : (
buffer[position + 4] << 24 |
buffer[position + 5] << 16 |
buffer[position + 6] << 8 |
buffer[position + 7]
);
highInt |= lowInt >>> 28;
if (size <= 6) { // clear the last bits
lowInt &= -0x10000;
+6 -1
View File
@@ -208,7 +208,12 @@ export function readKey(buffer, start, end, inSequence) {
let size = end - position
let lowInt
if (size > 4) {
lowInt = dataView.getInt32(position + 4)
lowInt = position + 8 <= buffer.length ? dataView.getInt32(position + 4) : (
buffer[position + 4] << 24 |
buffer[position + 5] << 16 |
buffer[position + 6] << 8 |
buffer[position + 7]
)
highInt |= lowInt >>> 28
if (size <= 6) { // clear the last bits
lowInt &= -0x10000
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "ordered-binary",
"author": "Kris Zyp",
"version": "1.6.0",
"version": "1.6.1",
"description": "Conversion of JavaScript primitives to and from Buffer with binary order matching natural primitive order",
"license": "MIT",
"repository": {
+2
View File
@@ -28,6 +28,8 @@ suite('key buffers', () => {
assert.strictEqual(fromBufferKey(toBufferKey(3.4)), 3.4)
assert.strictEqual(fromBufferKey(toBufferKey(Math.PI)), Math.PI)
assert.strictEqual(fromBufferKey(toBufferKey(2002225)), 2002225)
// check to make sure it works with a limited ArrayBuffer
assert.strictEqual(fromBufferKey(new Uint8Array(toBufferKey(2002225))), 2002225)
assert.strictEqual(fromBufferKey(toBufferKey(9377288)), 9377288)
assert.strictEqual(fromBufferKey(toBufferKey(1503579323825)), 1503579323825)
assert.strictEqual(fromBufferKey(toBufferKey(1503579323825.3523532)), 1503579323825.3523532)