Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-lmdb

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-lmdb - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

28

example-advanced1-indexing.js

@@ -95,23 +95,13 @@

try {
var shouldContinue = true;
cursor.goToRange(str);
// Go the the first occourence of `str` and iterate from there
for (var found = cursor.goToRange(str); found; found = cursor.goToNext()) {
// Stop the loop if the current key is no longer what we're looking for
if (found !== str)
break;
while (shouldContinue) {
cursor.getCurrentNumber(function(key, data) {
//console.log(key.length, str.length, key == str);
if (key !== str) {
shouldContinue = false;
}
else {
results.push(data);
}
});
cursor.goToNext();
}
// Get current data item and push it to results
cursor.getCurrentNumber(function(key, data) {
results.push(data);
});
}
catch (err) {
console.log(err);
// Error here only means that we've reached the end
}

@@ -118,0 +108,0 @@ cursor.close();

@@ -31,2 +31,6 @@

var stat = dbi.stat(txn);
console.log("\ndatabase statistics:");
console.dir(stat);
if (data === null) {

@@ -51,2 +55,1 @@ // Put data

env.close();

@@ -13,5 +13,5 @@ {

"repository": "https://github.com/Venemo/node-lmdb",
"version": "0.2.1",
"version": "0.2.2",
"main": "./build/Release/node-lmdb",
"gypfile": true
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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