All Projects → Level → level-ws

Level / level-ws

Licence: MIT license
A basic writable stream for abstract-level databases.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to level-ws

cwlogs-writable
Writable stream for AWS CloudWatch Logs
Stars: ✭ 18 (-5.26%)
Mutual labels:  streams, writable-streams
.
A simple streaming library
Stars: ✭ 99 (+421.05%)
Mutual labels:  streams
game-map-editor
game-map-editor
Stars: ✭ 17 (-10.53%)
Mutual labels:  level
streams-workshop
A workshop on Node.js Streams
Stars: ✭ 176 (+826.32%)
Mutual labels:  streams
aarbac
An Automated Role Based Access Control .NET framework with T-SQL Query Parser which automatically parse select, insert, update, delete queries based on the logged in user role
Stars: ✭ 18 (-5.26%)
Mutual labels:  level
labeledpipe
Lazypipe with labels.
Stars: ✭ 15 (-21.05%)
Mutual labels:  streams
async-stream-generator
Pipe ES6 Async Generators through Node.js Streams
Stars: ✭ 48 (+152.63%)
Mutual labels:  streams
kafka-shell
⚡A supercharged, interactive Kafka shell built on top of the existing Kafka CLI tools.
Stars: ✭ 107 (+463.16%)
Mutual labels:  streams
tevere
🏞 Decentralized DB over IPFS
Stars: ✭ 57 (+200%)
Mutual labels:  level
fetch
A fetch API polyfill for React Native with text streaming support.
Stars: ✭ 27 (+42.11%)
Mutual labels:  streams
monogram
Aspect-oriented layer on top of the MongoDB Node.js driver
Stars: ✭ 76 (+300%)
Mutual labels:  streams
compressstream-explainer
Compression Streams Explained
Stars: ✭ 22 (+15.79%)
Mutual labels:  streams
java-core
Collections of solutions for micro-tasks created while building modules as part of project. Also has very fun stuffs :)
Stars: ✭ 35 (+84.21%)
Mutual labels:  streams
stream-list-updater
Automation for updating an index of live George Floyd protest streams
Stars: ✭ 15 (-21.05%)
Mutual labels:  streams
go-streams
Stream Collections for Go. Inspired in Java 8 Streams and .NET Linq
Stars: ✭ 127 (+568.42%)
Mutual labels:  streams
streamalg
Extensible stream pipelines with object algebras.
Stars: ✭ 26 (+36.84%)
Mutual labels:  streams
subleveldown
Split a levelup database into sublevels with their own keyspace, encoding and events.
Stars: ✭ 117 (+515.79%)
Mutual labels:  level
java8-streams-and-exceptions
Experiments with dealing with exceptions while using the Stream API
Stars: ✭ 36 (+89.47%)
Mutual labels:  streams
flowage
Easy transformations and filtering for NodeJS object streams.
Stars: ✭ 85 (+347.37%)
Mutual labels:  streams
JavaCertification
This is a full resource guide for my attempt to get Java 11 Certified
Stars: ✭ 67 (+252.63%)
Mutual labels:  streams

level-ws

A basic writable stream for abstract-level databases, using Node.js core streams. This is not a high-performance stream. If benchmarking shows that your particular usage does not fit then try one of the alternative writable streams that are optimized for different use cases.

📌 To instead write data using Web Streams, see level-web-stream.

level badge npm Node version Test Coverage Standard Common Changelog Donate

Usage

If you are upgrading: please see UPGRADING.md.

const { Level } = require('level')
const WriteStream = require('level-ws')

const db = new Level('./db', { valueEncoding: 'json' })
const ws = new WriteStream(db)

ws.on('close', function () {
  console.log('Done!')
})

ws.write({ key: 'alice', value: 42 })
ws.write({ key: 'bob', value: 7 })

// To delete entries, specify an explicit type
ws.write({ type: 'del', key: 'tomas' })
ws.write({ type: 'put', key: 'sara', value: 16 })

ws.end()

API

ws = new WriteStream(db[, options])

Create a writable stream that operates in object mode, accepting batch operations to be committed with db.batch() on each tick of the Node.js event loop. The optional options argument may contain:

  • type (string, default: 'put'): default batch operation type if not set on indididual operations.
  • maxBufferLength (number, default Infinity): limit the size of batches. When exceeded, the stream will stop processing writes until the current batch has been committed.
  • highWaterMark (number, default 16): buffer level when stream.write() starts returning false.

Contributing

Level/level-ws is an OPEN Open Source Project. This means that:

Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.

See the Contribution Guide for more details.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].