level-concat-iterator
Concatenate items from an iterator into an array.
Usage
var concat = require('level-concat-iterator')
var leveldown = require('leveldown')
var db = leveldown('DB')
db.open(function () {
db.put('foo', 'bar', function () {
concat(db.iterator(), function (err, data) {
console.log(data)
})
})
})
API
concat(iterator[, nextTick], cb)
Takes an abstract-leveldown
compatible iterator
as first parameter and calls back with an array of keys and values. Second parameter is an optional function for handling nextTick
, which defaults to process.nextTick
. Calls back with an error if iterator.next(cb)
or iterator.end(cb)
errors.
Contributing
level-concat-iterator
is an OPEN Open Source Project. This means that:
Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
See the contribution guide
file for more details.
License
MIT © 2018-present level-concat-iterator
Contributors.