{"name":"level-concat-iterator","version":"1.0.0","description":"Concatenate items from an iterator into an array.","main":"index.js","scripts":{"test":"standard && node test"},"keywords":["concatenate","iterator","array"],"author":{"name":"Lars-Magnus Skog","email":"ralphtheninja@riseup.net"},"license":"MIT","devDependencies":{"standard":"^11.0.1","tape":"^4.9.1"},"engines":{"node":">=6"},"gitHead":"9e62b4269efeffee1052cc84e7e31be243a35893","_id":"level-concat-iterator@1.0.0","_npmVersion":"6.1.0","_nodeVersion":"10.1.0","_npmUser":{"name":"ralphtheninja","email":"ralphtheninja@riseup.net"},"dist":{"integrity":"sha512-5m4xIa9zJxSrFLzo0IvuIOPsCDmpd7iLtSt1OVNBhcLfALoLwMbyO7JyixD8VouetE6crQ9AQmn/v17fXL4Evw==","shasum":"3e713ae6678c596b8733d5faedc6af47a2f233d7","tarball":"http://registry-npm.ywwl.com/level-concat-iterator/download/level-concat-iterator-1.0.0.tgz","fileCount":9,"unpackedSize":7103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbLs6OCRA9TVsSAnZWagAAZwIQAJbrLKrSrgFQ/Sj8qNJW\nsn0Z9gPLq4RhJiDlvx+zMCCGQo1Y29OXH1wj3CJ9pFRLTvDvmbfYcDAz+exb\nikkvsoMCsSQcFTT+gR7LgM0ZpN6iISTFfekz8R60aa3BzrKxFV9Hg2PsQ1GH\ntkA/jIhBazRN88KGb2ozft6OzFhAOJQatIU0CUgERDWYF+VX1h9s4KESdrB4\nzJwPm7sUAyCrmyHVJF86CUROeomcPpQlG5NO12ZMOQIiSGtbCXz+js2s/rgD\nrcGU+RdOKVl6Fq1a8dMB5HuG66o81EgPWEGUwD0MqKIFbQ9JNh3U68PcWRhZ\nFPSn40vVvDLtYz5c0K+GorRnL9qbbJldoh2v+N/9PRrBRm3oCQXoQkeOOVv4\n3OjEG2m/PkGB/LsbsqsGOcdqGcwEfxdlommwpWm3Q7wbfCvPPC/f9AVgJNc7\nQyKpI6WQW5D4B2dY9DzXaakPDjGuIg6uiJHohC92EXz5iOAC/vQZW4ZdBI+f\nkzvVlNRRfr9u1MRaw+ERJFhomMg6D5Cxr/Ab8ENmeDzvJTrN2T2f4ME57tda\nkIegIkmcIt46FudNgAR369WHolYL9vb14JOS+Ra0J0FdWgESg2qsgkTd4X1H\nenSnHFW2qJ9kKoYpj6v+5xV/BzFRXWJd4HxMNsF100J4Qxae+SWePr20Qkvw\nsHmH\r\n=fFZF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIASpHYDGUrXJrrKQdW/lBqMZxWSNlYJUVSmj3yaDvIEnAiBgcES3ITOn6LnNliAvJ1iCudQiLDfudilp++urDNtG6w=="}],"size":2805,"noattachment":false,"key":"/level-concat-iterator/-/level-concat-iterator-1.0.0.tgz"},"maintainers":[{"name":"ralphtheninja","email":"ralphtheninja@riseup.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/level-concat-iterator_1.0.0_1529794190127_0.1803025552025186"},"_hasShrinkwrap":false,"readme":"# level-concat-iterator\n\n**Concatenate entries from an iterator into an array.**\n\n[![level badge][level-badge]](https://github.com/Level/awesome)\n[![npm](https://img.shields.io/npm/v/level-concat-iterator.svg)](https://www.npmjs.com/package/level-concat-iterator)\n[![Node version](https://img.shields.io/node/v/level-concat-iterator.svg)](https://www.npmjs.com/package/level-concat-iterator)\n[![Test](https://img.shields.io/github/workflow/status/Level/concat-iterator/Test?label=test)](https://github.com/Level/concat-iterator/actions/workflows/test.yml)\n[![Coverage](https://img.shields.io/codecov/c/github/Level/supports?label=&logo=codecov&logoColor=fff)](https://codecov.io/gh/Level/supports)\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```js\nconst concat = require('level-concat-iterator')\nconst level = require('level')\n\nconst db = level('./db')\n\ndb.put('foo', 'bar', function (err) {\n  if (err) throw err\n\n  concat(db.iterator(), function (err, entries) {\n    if (err) throw err\n\n    // [{ key: 'foo', value: 'bar' }]\n    console.log(entries)\n  })\n})\n```\n\nWith promises:\n\n```js\nawait db.put('foo', 'bar')\nconst entries = await concat(db.iterator())\n```\n\n_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._\n\n## API\n\n### `concat(iterator[, callback])`\n\nTakes an `abstract-leveldown` compatible `iterator` as first parameter and calls the `callback` with an array of entries, where each entry is an object in the form `{ key, value }`. Calls the `callback` with an error if `iterator.next()` or `iterator.end()` errors. If no callback is provided, a promise is returned.\n\n## Contributing\n\n[`Level/concat-iterator`](https://github.com/Level/concat-iterator) 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\nSupport us with a monthly donation on [Open Collective](https://opencollective.com/level) and help us continue our work.\n\n## License\n\n[MIT](LICENSE)\n\n[level-badge]: https://leveljs.org/img/badge.svg\n","publish_time":1529794190211,"deprecated":"Superseded by abstract-level (https://github.com/Level/community#faq)","_cnpm_publish_time":1529794190211,"dist-tags":{"latest":"3.1.0"}}