Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/heapwolf/level-subtree

build and maintain a tree from the sublevels in a leveldb instance
https://github.com/heapwolf/level-subtree

Last synced: about 3 hours ago
JSON representation

build and maintain a tree from the sublevels in a leveldb instance

Awesome Lists containing this project

README

        

# SYNOPSIS
Build and maintain a javascript tree from the sublevels in a leveldb instance. Faster than a full scan.

# USAGE
To initialize level-subtree
```js
var Tree = require('level-subtree')
var db = require('level')('./db')
var tree = Tree(db)

var handle = tree.init(function(err, tree) {
// creates a tree from the existing keys.
})
```

To update the tree...

```js
handle.update(key) // use when adding a new sublevel.
```