Skip to content
LevelUP writable stream compatible with streams2
JavaScript Shell CSS
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
tests
.gitignore
README.md
index.js
package.json
write_stream.js

README.md

level-writestream

Streams2-compliant write stream for LevelDB

Install

$ npm i level-writestream --save

(also install level if you haven't already:

$ npm i level --save

)

Import

var LevelWriteStream = require('level-writestream');

Apply

var db = level('/path/to/level/db/dir');
LevelWriteStream(db);

Use

var ws = db.createWriteStream();
ws.write({key: 'A', value: 'B'}, function(err) {
  if (err) throw err;
});

source.pipe(ws);

ws.once('finish', function() {
  console.log('finished');
});

You can use the same options as in the LevelUP API.

Benchmark

$ cd tests/benchmarks
$ ./run

License

MIT

Something went wrong with that request. Please try again.