{"name":"level-ws","description":"A basic WriteStream implementation for LevelUP","version":"1.0.0","repository":{"type":"git","url":"git+https://github.com/Level/level-ws.git"},"homepage":"https://github.com/Level/level-ws","keywords":["leveldb","stream","levelup"],"main":"level-ws.js","dependencies":{"inherits":"^2.0.3","readable-stream":"^2.2.8","xtend":"^4.0.1"},"devDependencies":{"coveralls":"~3.0.1","level":"^4.0.0","level-concat-iterator":"^2.0.0","nyc":"~12.0.2","secret-event-listener":"~1.0.0","standard":"^11.0.1","tape":"^4.9.0","tempy":"^0.2.1"},"scripts":{"test":"standard && nyc node test.js","coverage":"nyc report --reporter=text-lcov | coveralls"},"license":"MIT","engines":{"node":">=6"},"gitHead":"3e2bcab3c5470c71d692629aea8731c3b067d461","bugs":{"url":"https://github.com/Level/level-ws/issues"},"_id":"level-ws@1.0.0","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"ralphtheninja","email":"ralphtheninja@riseup.net"},"dist":{"integrity":"sha512-RXEfCmkd6WWFlArh3X8ONvQPm8jNpfA0s/36M4QzLqrLEIt1iJE9WBHLZ5vZJK6haMjJPJGJCQWfjMNnRcq/9Q==","shasum":"19a22d2d4ac57b18cc7c6ecc4bd23d899d8f603b","tarball":"http://registry-npm.ywwl.com/level-ws/download/level-ws-1.0.0.tgz","fileCount":9,"unpackedSize":30037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbN/A8CRA9TVsSAnZWagAA3EYQAJuzN1Ff7tvlsqcDv2Xk\n31LJ69R8mdD2vROuFHd/JGdy1gdgSuME0sUD3HMM7gBsNu35Sf5TJOdPxLZt\nL9RtXkdf9K8/0or3NtNy1wXHiuFMZK5b/wNAyB1X87j/jcZ2AOWKquCwpFxi\n8gHAg/zvrfd3AeKsrM3uxAWf00D7WztLmlb8l5j3E20lPKMYfVDwQ/kqHwJh\n+Z+0N+cdRA9cJrHjvnjn1mEzfT0R3mKRK3YMqMRZNW94ZbBCWCy03fsmpnQ4\nyzdiRr+daYXm6ZXmdKkkc57OebN6K39/qFGzYvxI8LcF15iU1qD61vy2XjiC\nqXCplrsd6yZgEDIr9+lRl20VEt+BrDS/g2r9beWf9QK0MjBH3BeX44Ck4c8g\nk2LXSJGSN633EO9dhg2i/Cn7iDjw+5lfohW+zXBkh/ARoNxu2MVBe94a/47Z\niRIWKotku2t/TV6WExy5DwZ28bC0xhqXXvWSlT9g5QNp/Cm9UrMeEVaOnU4O\n8SK0r5bZQN9RtifFOEUigo18ybVj2unWZ+hXH29la3Iz20D8U/a1+a+biPA0\nSiVS2U4Oqe4X9GJMFRubYLAZaHRyOcAh5ZpZqkohaagZ1w5AE/hrFQ822FBm\nTI+G6ZD2xBoSN2655q7N5XSaRlx/YeLyiP0aeGezP69k79cjN9gH2HfyBL32\n/C/Q\r\n=YmLN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGzFlsev+2jEVGU1Z95btKb0hbwlb83RJRg+abT7q0Q6AiEAuajxIqtEZXphE8dDLnl1rSdalh2GsW8IQwG8yJ28P3A="}],"size":8101,"noattachment":false,"key":"/level-ws/-/level-ws-1.0.0.tgz"},"maintainers":[{"email":"julian@juliangruber.com","name":"juliangruber"},{"email":"ralphtheninja@riseup.net","name":"ralphtheninja"},{"email":"r@va.gg","name":"rvagg"},{"email":"dev@vincentweevers.nl","name":"vweevers"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/level-ws_1.0.0_1530392636660_0.6933303311859591"},"_hasShrinkwrap":false,"readme":"# level-ws\n\n**A basic writable stream for [`abstract-level`](https://github.com/Level/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.\n\n> :pushpin: To instead write data using Web Streams, see [`level-web-stream`](https://github.com/Level/web-stream).\n\n[![level badge][level-badge]](https://github.com/Level/awesome)\n[![npm](https://img.shields.io/npm/v/level-ws.svg)](https://www.npmjs.com/package/level-ws)\n[![Node version](https://img.shields.io/node/v/level-ws.svg)](https://www.npmjs.com/package/level-ws)\n[![Test](https://img.shields.io/github/workflow/status/Level/level-ws/Test?label=test)](https://github.com/Level/level-ws/actions/workflows/test.yml)\n[![Coverage](https://img.shields.io/codecov/c/github/Level/level-ws?label=\\&logo=codecov\\&logoColor=fff)](https://codecov.io/gh/Level/level-ws)\n[![Standard](https://img.shields.io/badge/standard-informational?logo=javascript\\&logoColor=fff)](https://standardjs.com)\n[![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org)\n[![Donate](https://img.shields.io/badge/donate-orange?logo=open-collective\\&logoColor=fff)](https://opencollective.com/level)\n\n## Usage\n\n_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._\n\n```js\nconst { Level } = require('level')\nconst WriteStream = require('level-ws')\n\nconst db = new Level('./db', { valueEncoding: 'json' })\nconst ws = new WriteStream(db)\n\nws.on('close', function () {\n  console.log('Done!')\n})\n\nws.write({ key: 'alice', value: 42 })\nws.write({ key: 'bob', value: 7 })\n\n// To delete entries, specify an explicit type\nws.write({ type: 'del', key: 'tomas' })\nws.write({ type: 'put', key: 'sara', value: 16 })\n\nws.end()\n```\n\n## API\n\n### `ws = new WriteStream(db[, options])`\n\nCreate a [writable stream](https://nodejs.org/dist/latest-v18.x/docs/api/stream.html#stream_class_stream_writable) 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:\n\n- `type` (string, default: `'put'`): default batch operation type if not set on indididual operations.\n- `maxBufferLength` (number, default `Infinity`): limit the size of batches. When exceeded, the stream will stop processing writes until the current batch has been committed.\n- `highWaterMark` (number, default `16`): buffer level when `stream.write()` starts returning false.\n\n## Contributing\n\n[`Level/level-ws`](https://github.com/Level/level-ws) is an **OPEN Open Source Project**. This means that:\n\n> 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.\n\nSee the [Contribution Guide](https://github.com/Level/community/blob/master/CONTRIBUTING.md) for more details.\n\n## License\n\n[MIT](LICENSE)\n\n[level-badge]: https://leveljs.org/img/badge.svg\n","publish_time":1530392636706,"_cnpm_publish_time":1530392636706,"dist-tags":{"latest":"4.0.0"}}