{"name":"level-concat-iterator","version":"2.0.0","description":"Concatenate items from an iterator into an array.","main":"index.js","scripts":{"test":"standard && node test"},"repository":{"type":"git","url":"git+https://github.com/Level/concat-iterator.git"},"homepage":"https://github.com/Level/concat-iterator","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":"30337a68066478462e93ecfc1f0fd3f609bb7851","bugs":{"url":"https://github.com/Level/concat-iterator/issues"},"_id":"level-concat-iterator@2.0.0","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"ralphtheninja","email":"ralphtheninja@riseup.net"},"dist":{"integrity":"sha512-gMs7JtWp479SOBjJQteQ+WMctfiQXG1SX5EuIGWTTUP37mKqs6BcYcjfZVVzAdTq0lAcSYpL2xGwmCG/hbjOcg==","shasum":"20f20242f75307540c5819b768a76881a518627b","tarball":"http://registry-npm.ywwl.com/level-concat-iterator/download/level-concat-iterator-2.0.0.tgz","fileCount":10,"unpackedSize":7805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbNAOvCRA9TVsSAnZWagAAxO0P/0m2o+XapMihQcMmjIZK\nlLWSwIRxwnfoFUKjxXclLRPFHQ0o6QoP2vztaVuOTrj6abM3KysRSnheqV2h\n+5BZ8/XKDjUdgcrbs/NhT6XhUub8a+ug/SV07WQfOwqAj/Rh2Z3kHN7Z83vO\nY8r8Ytu/s1gMhMLUdMoRWf/U8MQW0Z77joK3OFxu9pLVXcXmg4AZO6IePEfC\n+MHCNbhR1dI7GV22ZZacWUDuuxHsdIVEPG0y6nsWJ+S5nmdbXJXpqxWzHs53\nXMJbQ2oNvBCxbla1pme3BtdEn9sjclFNxf1KfJ36OqE71r/G4O3rRMVnsBVW\nl5QglxIFgUv1tEgzXCbVyeAya9iaQaxCsXdlNF7LSFKnI7CzRZXLjoer9hux\nW/99Lmf9nSX191ntvi+acUlkYbNxy8NaZD2XaIHh3a3qrNTaa2ZnxneybIGn\nkVi8raU+czgMB+hg8Ae0rK1DJP3XakPS1pNHtBr2s+pZhtDMi+3RCCtmwROP\nGUO9Q+BMOK8/+ERWpx7bXYzZ151sqfVF1NsMhNLp7Gwve880yahdgQhL/B+r\nLyqTzyPL5xwgoetZ4HzutQvhSfE8lEs4/40723S186GKg1FRlTks09jqCWIg\nCyCg6G6OcG7jWYc+v/+s50QMv6Ly0/7PYTmlUKg2jZsglcwh9km6Vd7CaV9s\nTq5C\r\n=jXXW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBX7V+RKH335xSruypwiYWC1cbJ8wexYIS0rO8dZCkvQIhAJ08KHOg14rMLp3prXuittZijyBl6eyV+w55wbOz5HHq"}],"size":3055,"noattachment":false,"key":"/level-concat-iterator/-/level-concat-iterator-2.0.0.tgz"},"maintainers":[{"email":"julian@juliangruber.com","name":"juliangruber"},{"email":"ralphtheninja@riseup.net","name":"ralphtheninja"},{"email":"dev@vincentweevers.nl","name":"vweevers"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/level-concat-iterator_2.0.0_1530135471442_0.2720429587519917"},"_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":1530135471531,"deprecated":"Superseded by abstract-level (https://github.com/Level/community#faq)","_cnpm_publish_time":1530135471531,"dist-tags":{"latest":"3.1.0"}}