node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org »



Use the async iterator pattern used in LevelDown in LevelUp.

Async iterators can conveniently used with the async-iterators library.

var levelup = require('levelup')
var createIterator = require('levelup-iterator')
var iterators = require('async-iterators')
var db = levelup('test')
var iterator = createIterator(db, {start: 'b'})
iterators.forEach(iterator, function(err, entry) {
}, function() {

You can pass in all options to createIterator(db, [options]) that are used in LevelUp's db.createReadStream([options]).