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

@live-change/db

Package Overview
Dependencies
Maintainers
1
Versions
298
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@live-change/db - npm Package Compare versions

Comparing version 0.3.25 to 0.3.26

18

lib/queryGet.js
const { TableWriter, LogWriter } = require('./queryUpdate.js')
const maxGetLimit = 256
class ObjectReader {

@@ -46,4 +48,16 @@ #table = null

async onChange(cb) {
let objects = await (await this.#table).rangeGet({})
await Promise.all(objects.map(object => cb(object, null)))
let results = []
let objects = []
let range = { limit: maxGetLimit }
while(true) {
objects = await (await this.#table).rangeGet(range)
results = results.concat(await Promise.all(objects.map(object => cb(object, null))))
if(objects.length == maxGetLimit) {
range.gt = objects[objects.length - 1].id
console.log("GET LIMIT REACHED! GETTING MORE", range)
} else {
break // all processed
}
}
return results
}

@@ -50,0 +64,0 @@ unobserve(obs) {}

2

package.json
{
"name": "@live-change/db",
"version": "0.3.25",
"version": "0.3.26",
"description": "Database with observable data for live queries",

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

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