Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
similar issue with leveldb (level down)
var levelup = require('levelup')
, crypto = require('crypto');
var db = levelup('./mydb', {cacheSize: 0});
function uniqueGet(num){
if( num == 0 ) return;
var hash = crypto.createHash('md5').update( num.toString() ).digest("hex");
db.get(hash, function(err,result){
return uniqueGet(--num);
});
}
uniqueGet(5000000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.