Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

pgte/level-writestream

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

level-writestream

Build Status Dependency Status

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 plus all the streams2 API conventions.

Plain Benchmarks comparing LevelUP and Level-WriteStream

$ tests/benchmarks/old/run

Complex Benchmark

$ cd tests/benchmarks
$ ./run

License

MIT

About

LevelUP writable stream compatible with streams2

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.