Skip to content

mirkokiefer/levelup-iterator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#levelup-iterator 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) {
  console.log(entry)
}, function() {
  console.log('end')
})

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

About

use async iterators in node-levelup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published