leveled

A js-style LevelDB binding for node.

node-leveled

A js-style LevelDB binding for node.

  • sync and async methods, except for the constructor, which opens the db syncronously
  • put/del operations are batched automatically since LevelDB only supports one write at a time. That makes inserting way faster (see benchmarks)
  • get operations are always concurrent
  • the datatype is plain strings, support for buffers and other formats may be added
var db = require('leveled')('/tmp/mydb');
 
db.putSync('foo', 'bar')
 
db.get('some', function (errval) {
  val == 'value';
})
 
db.batch()
  .put('foo', 'bar')
  .del('baz')
  .write(function (err) {
    // success 
  })
$ npm install leveled

(MIT)