🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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

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