{"name":"level-concat-iterator","version":"3.1.0","description":"Concatenate entries from an iterator into an array.","author":{"name":"Lars-Magnus Skog","email":"ralphtheninja@riseup.net"},"license":"MIT","main":"index.js","scripts":{"test":"standard && hallmark && nyc node test","test-browsers-local":"airtap --coverage test.js","coverage":"nyc report -r lcovonly","hallmark":"hallmark --fix","dependency-check":"dependency-check . test.js","prepublishOnly":"npm run dependency-check"},"dependencies":{"catering":"^2.1.0"},"devDependencies":{"airtap":"^4.0.3","airtap-playwright":"^1.0.1","dependency-check":"^3.3.0","hallmark":"^3.1.0","nyc":"^15.1.0","standard":"^16.0.3","tape":"^5.0.1"},"repository":{"type":"git","url":"git+https://github.com/Level/concat-iterator.git"},"homepage":"https://github.com/Level/concat-iterator","keywords":["level","concatenate","iterator","array"],"engines":{"node":">=10"},"gitHead":"96bdda32a24492946f19dfe7b73c7ab552d80619","bugs":{"url":"https://github.com/Level/concat-iterator/issues"},"_id":"level-concat-iterator@3.1.0","_nodeVersion":"16.9.1","_npmVersion":"7.21.1","dist":{"integrity":"sha512-BWRCMHBxbIqPxJ8vHOvKUsaO0v1sLYZtjN3K2iZJsRBYtp+ONsY6Jfi6hy9K3+zolgQRryhIn2NRZjZnWJ9NmQ==","shasum":"5235b1f744bc34847ed65a50548aa88d22e881cf","tarball":"http://registry-npm.ywwl.com/level-concat-iterator/download/level-concat-iterator-3.1.0.tgz","fileCount":6,"unpackedSize":8471,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0Qa/xXWuTmEuDavZqKRCrcPz+m16jc/vWYiyDhgw6xAIgOh670XdJ7FQVB6192J8by0D5o0qfXZQ8Lj/sabaAxWk="}],"size":3391,"noattachment":false,"key":"/level-concat-iterator/-/level-concat-iterator-3.1.0.tgz"},"_npmUser":{"name":"vweevers","email":"dev@vincentweevers.nl"},"directories":{},"maintainers":[{"name":"vweevers","email":"dev@vincentweevers.nl"},{"name":"juliangruber","email":"julian@juliangruber.com"},{"name":"ralphtheninja","email":"ralphtheninja@riseup.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/level-concat-iterator_3.1.0_1636054112200_0.28390955426896514"},"_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":1636054112335,"deprecated":"Superseded by abstract-level (https://github.com/Level/community#faq)","_cnpm_publish_time":1636054112335,"dist-tags":{"latest":"3.1.0"}}