{"name":"level-ws","version":"2.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 --reporter=text-lcov | coveralls","hallmark":"hallmark --fix","dependency-check":"dependency-check . test.js","prepublishOnly":"npm run dependency-check"},"dependencies":{"inherits":"^2.0.3","readable-stream":"^3.1.0","xtend":"^4.0.1"},"devDependencies":{"coveralls":"^3.0.1","dependency-check":"^3.3.0","hallmark":"^0.1.0","level":"^5.0.1","level-community":"^3.0.0","level-concat-iterator":"^2.0.0","nyc":"^13.2.0","secret-event-listener":"^1.0.0","standard":"^12.0.0","tape":"^4.9.0","tempy":"^0.2.1"},"hallmark":{"community":"level-community","ignore":["CONTRIBUTORS.md"]},"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":">=6"},"gitHead":"55880557e10e2e5a6ed4d85edac36c122a4fa3a3","bugs":{"url":"https://github.com/Level/level-ws/issues"},"_id":"level-ws@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.14.1","_npmUser":{"name":"vweevers","email":"dev@vincentweevers.nl"},"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"}],"dist":{"integrity":"sha512-1iv7VXx0G9ec1isqQZ7y5LmoZo/ewAsyDHNA8EFDW5hqH2Kqovm33nSFkSdnLLAK+I5FlT+lo5Cw9itGe+CpQA==","shasum":"207a07bcd0164a0ec5d62c304b4615c54436d339","tarball":"http://registry-npm.ywwl.com/level-ws/download/level-ws-2.0.0.tgz","fileCount":9,"unpackedSize":34473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcn7jVCRA9TVsSAnZWagAAEQwP/R5kKVzvDdr3H8nm1lnw\n1eZpyaiWM2EWHvJhVHHDvTruHet056eunPrTiFCzCREHippbhU/qV5NuvqIB\nsyo5uRussS41sup6daKWUk1CVwiPmh3PJ0dcOVG0o7J4Yqetyt5TZukshl63\ne5e/EbS75WqDYTr/2aaxX7FDP5VlrktYZUouF65/oughmjPXbcbmOCWsJIyc\nZhl581q9FId7L8vdEQgTywy4dpQjexiNAs56G+lfF4wMXbyMl3Kzsaixk4Lr\nKZ3Yd+qebm+/kZBi7jC4x0MMDDU683LBLdbaAJh2h/+uKcDyxmep6fyyRaGC\nH4wf+7Y/eOBwi8Hfzt36fQ0MPxeqF0iaQO8at6/n9vxzBbWntubAzd/UcX6u\npwhQtEU6zC7qEum3+P+KoxZObYWWRwgBjBYzyynABCZbqRjVc1UW075/SSYg\nRv3e1lSO29lJhflHEInZOp/U88L+1xMoor1KRXgqiqgIDctX9eIMhUeExS10\nRckGWZNDqVvWr2kWV7JyLKk9Py4od3oRuGKEICsRM5CI4ATQ9BnXhWDKuJd3\nxpXRaSvI7KnhCKJZWCwNR+S4gjl8U5RD0dAFk9b28UckApKBLz11Ra39dGLK\nXduLik80qQ2DIwHItWczc9svYKZ7wFhbEys6bsykJnevOGaFm238smEGghsa\nO49s\r\n=N5Kc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDs+YlpdGDwnS276QBGNL48Ko1Vp3PsUubOPewEWpXNYwIgbAu/A49spo+EDtzPJTLWHVlY3QwuljidrXa3dmd0Cnw="}],"size":8913,"noattachment":false,"key":"/level-ws/-/level-ws-2.0.0.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/level-ws_2.0.0_1553971413278_0.8920108894439835"},"_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":1553971413498,"_cnpm_publish_time":1553971413498,"dist-tags":{"latest":"4.0.0"}}