virtual-leveldown

1.0.1 • Public • Published

virtual-leveldown

Windows Mac/Linux
Windows Build status Build Status

LevelDOWN drop-in replacement that reads from a leveldb store, but writes to memory. It behaves like a leveldown, but all changes (put / del) are only made in memory, so that the original leveldb instance remains unchanged.

Install with npm install virtual-leveldown

Note that this is only a 3-lines tiny wrapper around virtualdown, that already ships with leveldown.

example

var virtualDOWN = require('virtual-leveldown')
 
var db = virtualDOWN('mydatabase') // filled with cats
 
db.open(function () {
    db.put('doggy', 'dogdog', function (err) {
      db.get('doggy', function (value) {
        // value == 'dogdog'
        // but the dog is not in 'mydatabase' on disk
      })
    })
})

/virtual-leveldown/

    Package Sidebar

    Install

    npm i virtual-leveldown

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • finnpauls