subleveldown
Sublevels implemented using leveldowns
npm install subleveldown
Usage
var sub = require('subleveldown')
var level = require('level')
var db = level('db')
var test = sub(db, 'test')
var test2 = sub(db, 'test2')
var nested = sub(test, 'nested')
test.put('hello', 'world', function() {
nested.put('hi', 'welt', function() {
test.createReadStream().on('data', console.log)
})
})
API
subdb = sub(db, [prefix], [options])
Returns a levelup instance that uses the subleveldown with prefix
.
The options
argument is passed to the levelup constructor
License
MIT