{"name":"level-ws","version":"3.0.0","description":"A basic WriteStream implementation for LevelUP","license":"MIT","main":"level-ws.js","scripts":{"test":"standard && hallmark && nyc node test.js","coverage":"nyc report -r lcovonly","hallmark":"hallmark --fix","dependency-check":"dependency-check . test.js","prepublishOnly":"npm run dependency-check"},"dependencies":{"inherits":"^2.0.3","readable-stream":"^3.1.0"},"devDependencies":{"dependency-check":"^3.3.0","hallmark":"^3.1.0","level":"^7.0.0","level-concat-iterator":"^3.0.0","nyc":"^15.1.0","secret-event-listener":"^1.0.0","standard":"^16.0.3","tape":"^5.0.1","tempy":"^1.0.1"},"repository":{"type":"git","url":"git+https://github.com/Level/level-ws.git"},"homepage":"https://github.com/Level/level-ws","keywords":["level","leveldb","stream","levelup"],"engines":{"node":">=10"},"gitHead":"7bd4c984785b6be225e3e3d06fe28463a43dc1a6","bugs":{"url":"https://github.com/Level/level-ws/issues"},"_id":"level-ws@3.0.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","_npmUser":{"name":"vweevers","email":"dev@vincentweevers.nl"},"maintainers":[{"name":"vweevers","email":"dev@vincentweevers.nl"},{"name":"rvagg","email":"r@va.gg"},{"name":"ralphtheninja","email":"ralphtheninja@riseup.net"}],"dist":{"integrity":"sha512-dHWw8wrffw2QzuTjcvHHGb6Wp5SFrZ21bJ9/AuHh2+72dWkR6Pt78SuC9zaPgY/1W8vL9/rh8CqNlxXz5QAWmw==","shasum":"36a2048cd952b4201b2ef08800621a3d787bb1ec","tarball":"http://registry-npm.ywwl.com/level-ws/download/level-ws-3.0.0.tgz","fileCount":6,"unpackedSize":18537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghWOsCRA9TVsSAnZWagAA3wMP/0CbQytIn/QijPnY4ZZM\nOsrCGudct8qmzoNDBOW5gYkEjOyj6tBYLloFPXdARC7LljSMqzbluhijhBRD\nf9+xQpM9w0/0N1rdlFu2xd6XnZoH45yAtzKuC+wS7+/5GbPgf+WMcsMR5O1l\nHpx+4fpzop4HfE7iOsRQ1CBgtzJkYlqsRv02fsr/A01+9cGNhhQWuP5hpCQH\nu9EdTgd+2cuCkpTu8tt5xV1WvJ0aueZv4RasWqywbx05/4TSUhAd/ySS5TNM\ngVxY+LtUBin961xpk7MA/LgP2T3fsLAnAsZJ47crPgnxoQqotYWHYRaxacHq\n0MpXTDfDnLSL74oT5BrbqnP/YJuPNYJGXUL+MfLV1/yA0bKX4QrHc8Ul8yu7\naH1g4u4WGzi4hSHAN9nLFClzOcHBFqReNTNx768uJDwgQxgUWkOJu81O3LZG\nV8GUsErpMEQ0TD1Slgpqkjopk6KBqD2dtt9w/ljsMmS+9bezQL8HhaVSmU1l\nxZlOcd/c7CcPSI34zxswEnjVgcoATxKaTw1jeBW+t+MRJ4SfGYtaX2SYSONs\ncefieMAulwyfOo9WtQLumeP5fE8OdA6a5sMNYGKpIL8hJa8KeBvVzU6Fz7fH\nG2MH2JeFUpu5qrYwWLumMrIA1QgKNnOF5O1TDTi3Kqwki5dDVBgVT/NinVRE\nzIhq\r\n=KpeO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/S1bxdY9MJW6986i/cG2HddqTFFlf5aoYp6fLVqGRdgIgedPC55fq1TYnW0MFpzXXc0Cd6lOU+gdp0VAFiZ2piDc="}],"size":6042,"noattachment":false,"key":"/level-ws/-/level-ws-3.0.0.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/level-ws_3.0.0_1619354540430_0.8664665218705825"},"_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":1619354540552,"_cnpm_publish_time":1619354540552,"dist-tags":{"latest":"4.0.0"}}