New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jembadb

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jembadb - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

2

package.json
{
"name": "jembadb",
"version": "3.0.2",
"version": "3.0.3",
"description": "Json Embeddable Appendable Database",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -28,2 +28,3 @@ 'use strict';

this.loadedBlocks = [];
this.newBlocks = [];
this.deltas = new Map();

@@ -137,3 +138,3 @@

this.blockList.set(this.currentBlockIndex, block);
this.loadedBlocks.push(this.currentBlockIndex);
this.newBlocks.push(this.currentBlockIndex);
this.blocksNotFinalized.set(this.currentBlockIndex, 1);

@@ -172,2 +173,13 @@

unloadBlocksIfNeeded() {
const nb = [];
for (const index of this.newBlocks) {
if (index < this.lastSavedBlockIndex) {
this.loadedBlocks.push(index);
} else {
nb.push(index);
}
}
this.newBlocks = nb;
if (this.loadedBlocks.length <= this.loadedBlocksCount)

@@ -177,9 +189,5 @@ return;

//check loaded
let missed = new Set();
while (this.loadedBlocks.length > this.loadedBlocksCount) {
const index = this.loadedBlocks.shift();
if (index >= this.lastSavedBlockIndex) {
missed.add(index);
continue;
}
const block = this.blockList.get(index);

@@ -192,4 +200,2 @@

}
this.loadedBlocks = this.loadedBlocks.concat(Array.from(missed));
}

@@ -196,0 +202,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc