{"name":"level-iterator-stream","version":"2.0.0","description":"Turn a leveldown iterator into a readable stream","scripts":{"test":"standard && node test.js"},"repository":{"type":"git","url":"git+https://github.com/Level/iterator-stream.git"},"dependencies":{"inherits":"^2.0.1","readable-stream":"^2.0.5","xtend":"^4.0.0"},"devDependencies":{"leveldown":"^1.4.1","standard":"^10.0.3","tape":"^4.4.0","through2":"^2.0.0"},"license":"MIT","gitHead":"849fff514eb2a4cfc11f1ca0691086c95c1812a3","bugs":{"url":"https://github.com/Level/iterator-stream/issues"},"homepage":"https://github.com/Level/iterator-stream#readme","_id":"level-iterator-stream@2.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"ralphtheninja","email":"ralphtheninja@riseup.net"},"dist":{"integrity":"sha512-TWOYw8HR5mhj6xwoVLo0yu26RPL6v28KgvhK1kY1CJf9LyL+rJXjx99zhORTYhN9ysOBIH+iaxAiqRteA+C1/g==","shasum":"e0fe4273a0322177c81bb87684016bb5b90a98b4","tarball":"http://registry-npm.ywwl.com/level-iterator-stream/download/level-iterator-stream-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDsOb/nqw5H9vwdixFcgbXIBsHVHLVBUuhDhG0r8iea+AiBIf0DbK8h13jIcbL3wcZh/cKSG8C6NmAZUSLdG3YTAtQ=="}],"size":3395,"noattachment":false,"key":"/level-iterator-stream/-/level-iterator-stream-2.0.0.tgz"},"maintainers":[{"email":"ralphtheninja@riseup.net","name":"ralphtheninja"},{"email":"julian@juliangruber.com","name":"juliangruber"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/level-iterator-stream-2.0.0.tgz_1503923633223_0.8221898472402245"},"directories":{},"readme":"# level-iterator-stream\n\n> Turn an [abstract-leveldown](https://github.com/Level/abstract-leveldown) iterator into a readable stream.\n\n[![level badge][level-badge]](https://github.com/Level/awesome)\n[![npm](https://img.shields.io/npm/v/level-iterator-stream.svg?label=&logo=npm)](https://www.npmjs.com/package/level-iterator-stream)\n[![Node version](https://img.shields.io/node/v/level-iterator-stream.svg)](https://www.npmjs.com/package/level-iterator-stream)\n[![Travis](https://img.shields.io/travis/com/Level/iterator-stream.svg?logo=travis&label=)](https://travis-ci.com/Level/iterator-stream)\n[![Coverage Status](https://coveralls.io/repos/github/Level/iterator-stream/badge.svg)](https://coveralls.io/github/Level/iterator-stream)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![npm](https://img.shields.io/npm/dm/level-iterator-stream.svg?label=dl)](https://www.npmjs.com/package/level-iterator-stream)\n[![Backers on Open Collective](https://opencollective.com/level/backers/badge.svg?color=orange)](#backers)\n[![Sponsors on Open Collective](https://opencollective.com/level/sponsors/badge.svg?color=orange)](#sponsors)\n\n## Usage\n\n**If you are upgrading:** please see [UPGRADING.md](UPGRADING.md).\n\n```js\nconst iteratorStream = require('level-iterator-stream')\nconst leveldown = require('leveldown')\n\nconst db = leveldown(__dirname + '/db')\n\ndb.open(function (err) {\n  if (err) throw err\n\n  const stream = iteratorStream(db.iterator())\n  stream.on('data', function (kv) {\n    console.log('%s -> %s', kv.key, kv.value)\n  })\n})\n```\n\n## Install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install level-iterator-stream\n```\n\n## API\n\n### `stream = iteratorStream(iterator[, options])`\n\nCreate a readable stream from `iterator`. The `options` are passed down to the `require('readable-stream').Readable` constructor, with `objectMode` forced to `true`. Set `options.keys` or `options.values` to `false` to only get keys or values. Otherwise receive `{ key, value }` objects.\n\nUpon stream end or `.destroy()` the `iterator` will be closed after which a `close` event is emitted on the stream.\n\n## Contributing\n\n[`Level/iterator-stream`](https://github.com/Level/iterator-stream) 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## Donate\n\nTo sustain [`Level`](https://github.com/Level) and its activities, become a backer or sponsor on [Open Collective](https://opencollective.com/level). Your logo or avatar will be displayed on our 28+ [GitHub repositories](https://github.com/Level) and [npm](https://www.npmjs.com/) packages. 💖\n\n### Backers\n\n[![Open Collective backers](https://opencollective.com/level/backers.svg?width=890)](https://opencollective.com/level)\n\n### Sponsors\n\n[![Open Collective sponsors](https://opencollective.com/level/sponsors.svg?width=890)](https://opencollective.com/level)\n\n## License\n\n[MIT](LICENSE.md) © 2012-present [Contributors](CONTRIBUTORS.md).\n\n[level-badge]: https://leveljs.org/img/badge.svg\n","publish_time":1503923634161,"_cnpm_publish_time":1503923634161,"dist-tags":{"latest":"5.0.0"}}