{"_id":"it-concat","_rev":"4576729","name":"it-concat","description":"Concat all buffers/strings yielded from an async iterable into a single BufferList/string","dist-tags":{"latest":"3.0.3"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":""}],"time":{"modified":"2026-04-10T15:45:08.000Z","created":"2019-11-29T11:46:45.517Z","3.0.3":"2024-04-17T06:49:32.744Z","3.0.2":"2024-04-17T06:43:52.157Z","3.0.1":"2022-10-18T17:23:46.431Z","3.0.0":"2022-10-18T17:17:30.001Z","2.0.0":"2021-04-16T09:41:54.887Z","1.0.3":"2021-03-22T23:00:50.286Z","1.0.2":"2020-10-12T10:25:05.971Z","1.0.1":"2020-09-03T07:47:37.871Z","1.0.0":"2019-11-29T11:46:45.517Z"},"users":{},"author":{"name":"Alan Shaw"},"repository":{"type":"git","url":"git+https://github.com/alanshaw/it-concat.git"},"versions":{"3.0.3":{"name":"it-concat","version":"3.0.3","description":"Concat all buffers/strings yielded from an async iterable into a single BufferList/string","author":{"name":"Alan Shaw"},"license":"Apache-2.0 OR MIT","homepage":"https://github.com/alanshaw/it-concat#readme","repository":{"type":"git","url":"git+https://github.com/alanshaw/it-concat.git"},"bugs":{"url":"https://github.com/alanshaw/it-concat/issues"},"publishConfig":{"access":"public","provenance":true},"keywords":["async","buffer","bufferlist","concat","glue","iterable","iterator","join","string"],"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"project":true,"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","test:node":"aegir test -t node --cov","test:electron-main":"aegir test -t electron-main","release":"aegir release"},"dependencies":{"uint8arraylist":"^2.3.3","uint8arrays":"^5.0.3"},"devDependencies":{"aegir":"^42.2.5","iso-random-stream":"^2.0.2","random-int":"^3.0.0"},"engines":{"node":">=16.0.0","npm":">=7.0.0"},"_id":"it-concat@3.0.3","gitHead":"e47e5d133ef8e1ab63a5f263bbc6d55268c793b1","_nodeVersion":"20.12.1","_npmVersion":"10.5.2","dist":{"shasum":"880afa53f8f11a5a65c5d0ce7dbfdd7195290d92","size":12210,"noattachment":false,"key":"/it-concat/-/it-concat-3.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/it-concat/download/it-concat-3.0.3.tgz"},"_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/it-concat_3.0.3_1713336572589_0.4824176881322062"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-04-17T06:49:32.744Z","publish_time":1713336572744,"_source_registry_name":"default","_cnpm_publish_time":1713336572744},"3.0.2":{"name":"it-concat","version":"3.0.2","description":"Concat all buffers/strings yielded from an async iterable into a single BufferList/string","author":{"name":"Alan Shaw"},"license":"Apache-2.0 OR MIT","homepage":"https://github.com/alanshaw/it-concat#readme","repository":{"type":"git","url":"git+https://github.com/alanshaw/it-concat.git"},"bugs":{"url":"https://github.com/alanshaw/it-concat/issues"},"publishConfig":{"access":"public","provenance":true},"keywords":["async","buffer","bufferlist","concat","glue","iterable","iterator","join","string"],"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"project":true,"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","test:node":"aegir test -t node --cov","test:electron-main":"aegir test -t electron-main","release":"aegir release"},"dependencies":{"uint8arraylist":"^2.3.3","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^42.2.5","iso-random-stream":"^2.0.2","random-int":"^3.0.0"},"engines":{"node":">=16.0.0","npm":">=7.0.0"},"_id":"it-concat@3.0.2","gitHead":"a7d6f1a55a18fc0881411092e356386397a9fe91","_nodeVersion":"20.12.1","_npmVersion":"10.5.2","dist":{"shasum":"4e0cbb1ece956318255ace84614cd0152cdc7ef4","size":12235,"noattachment":false,"key":"/it-concat/-/it-concat-3.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/it-concat/download/it-concat-3.0.2.tgz"},"_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/it-concat_3.0.2_1713336232008_0.039457302755687707"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-04-17T06:43:52.157Z","publish_time":1713336232157,"_source_registry_name":"default","_cnpm_publish_time":1713336232157},"3.0.1":{"name":"it-concat","version":"3.0.1","description":"Concat all buffers/strings yielded from an async iterable into a single BufferList/string","author":{"name":"Alan Shaw"},"license":"Apache-2.0 OR MIT","homepage":"https://github.com/alanshaw/it-concat#readme","repository":{"type":"git","url":"git+https://github.com/alanshaw/it-concat.git"},"bugs":{"url":"https://github.com/alanshaw/it-concat/issues"},"keywords":["async","buffer","bufferlist","concat","glue","iterable","iterator","join","string"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","test:node":"aegir test -t node --cov","test:electron-main":"aegir test -t electron-main","release":"aegir release"},"dependencies":{"uint8arraylist":"^2.3.3","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.5.6","iso-random-stream":"^2.0.2","random-int":"^3.0.0"},"gitHead":"65594012436ca5bea7e7d75aa07834e768f5eebb","_id":"it-concat@3.0.1","_nodeVersion":"16.17.1","_npmVersion":"8.19.2","dist":{"shasum":"71ffcc66e0f766af3caf61805de0d3106086cdc9","size":4109,"noattachment":false,"key":"/it-concat/-/it-concat-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/it-concat/download/it-concat-3.0.1.tgz"},"_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/it-concat_3.0.1_1666113826281_0.17166631848094926"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-10-25T07:20:34.996Z","publish_time":1666113826431,"_cnpm_publish_time":1666113826431},"3.0.0":{"name":"it-concat","version":"3.0.0","description":"Concat all buffers/strings yielded from an async iterable into a single BufferList/string","author":{"name":"Alan Shaw"},"license":"Apache-2.0 OR MIT","homepage":"https://github.com/alanshaw/it-concat#readme","repository":{"type":"git","url":"git+https://github.com/alanshaw/it-concat.git"},"bugs":{"url":"https://github.com/alanshaw/it-concat/issues"},"keywords":["async","buffer","bufferlist","concat","glue","iterable","iterator","join","string"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","test:node":"aegir test -t node --cov","test:electron-main":"aegir test -t electron-main","release":"aegir release"},"dependencies":{"uint8arraylist":"^2.3.3","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.5.6","iso-random-stream":"^2.0.2","random-int":"^2.0.1"},"gitHead":"fcb8bc4f72d293cbd1e93453d68c388b22c27b76","_id":"it-concat@3.0.0","_nodeVersion":"16.17.1","_npmVersion":"8.19.2","dist":{"shasum":"d13b5f729c9aae5857c02ee8af202770b0efdbb5","size":4106,"noattachment":false,"key":"/it-concat/-/it-concat-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/it-concat/download/it-concat-3.0.0.tgz"},"_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/it-concat_3.0.0_1666113449790_0.3395023839340727"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-10-25T07:20:34.141Z","publish_time":1666113450001,"_cnpm_publish_time":1666113450001},"2.0.0":{"name":"it-concat","version":"2.0.0","description":"Concat all buffers/strings yielded from an async iterable into a single BufferList/string","main":"index.js","scripts":{"test":"ava test.mjs --verbose","lint":"standard","coverage":"nyc --reporter=text --reporter=lcov npm test"},"keywords":["concat","join","glue","buffer","bufferlist","string","iterable","iterator","async"],"author":{"name":"Alan Shaw"},"license":"MIT","dependencies":{"bl":"^5.0.0"},"devDependencies":{"@types/bl":"^5.0.0","ava":"^3.12.1","nyc":"^15.1.0","random-bytes":"^1.0.0","random-int":"^2.0.1","standard":"^16.0.3"},"repository":{"type":"git","url":"git+https://github.com/alanshaw/it-concat.git"},"bugs":{"url":"https://github.com/alanshaw/it-concat/issues"},"homepage":"https://github.com/alanshaw/it-concat#readme","gitHead":"1f6c4d1f0c64538cf0035772d25f9277ae9e7d0a","_id":"it-concat@2.0.0","_nodeVersion":"15.12.0","_npmVersion":"7.6.3","dist":{"shasum":"b4dc02aeb7365bada05b247c1ee50f3bbc147419","size":3255,"noattachment":false,"key":"/it-concat/-/it-concat-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/it-concat/download/it-concat-2.0.0.tgz"},"_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/it-concat_2.0.0_1618566114758_0.5693505028024441"},"_hasShrinkwrap":false,"publish_time":1618566114887,"_cnpm_publish_time":1618566114887,"_cnpmcore_publish_time":"2021-12-16T19:09:52.117Z"},"1.0.3":{"name":"it-concat","version":"1.0.3","description":"Concat all buffers/strings yielded from an async iterable into a single BufferList/string","main":"index.js","scripts":{"test":"ava test.mjs --verbose","lint":"standard","coverage":"nyc --reporter=text --reporter=lcov npm test"},"keywords":["concat","join","glue","buffer","bufferlist","string","iterable","iterator","async"],"author":{"name":"Alan Shaw"},"license":"MIT","dependencies":{"bl":"^4.0.0"},"devDependencies":{"@types/bl":"^4.1.0","ava":"^3.12.1","nyc":"^15.1.0","random-bytes":"^1.0.0","random-int":"^2.0.1","standard":"^16.0.3"},"repository":{"type":"git","url":"git+https://github.com/alanshaw/it-concat.git"},"bugs":{"url":"https://github.com/alanshaw/it-concat/issues"},"homepage":"https://github.com/alanshaw/it-concat#readme","gitHead":"ea52b93f3b66442ef9d4d6a0b6203565086e75d0","_id":"it-concat@1.0.3","_nodeVersion":"15.6.0","_npmVersion":"7.4.0","dist":{"shasum":"84db9376e4c77bf7bc1fd933bb90f184e7cef32b","size":3256,"noattachment":false,"key":"/it-concat/-/it-concat-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/it-concat/download/it-concat-1.0.3.tgz"},"_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/it-concat_1.0.3_1616454050129_0.8210881977061399"},"_hasShrinkwrap":false,"publish_time":1616454050286,"_cnpm_publish_time":1616454050286,"_cnpmcore_publish_time":"2021-12-16T19:09:52.328Z"},"1.0.2":{"name":"it-concat","version":"1.0.2","description":"Concat all buffers/strings yielded from an async iterable into a single BufferList/string","main":"index.js","scripts":{"test":"ava test.mjs --verbose","lint":"standard","coverage":"nyc --reporter=text --reporter=lcov npm test"},"keywords":["concat","join","glue","buffer","bufferlist","string","iterable","iterator","async"],"author":{"name":"Alan Shaw"},"license":"MIT","dependencies":{"bl":"^4.0.0"},"devDependencies":{"@types/bl":"^2.1.0","ava":"^3.12.1","nyc":"^15.1.0","random-bytes":"^1.0.0","random-int":"^2.0.1","standard":"^14.3.1"},"repository":{"type":"git","url":"git+https://github.com/alanshaw/it-concat.git"},"bugs":{"url":"https://github.com/alanshaw/it-concat/issues"},"homepage":"https://github.com/alanshaw/it-concat#readme","gitHead":"4855458f216d7546d277ca33ad2696380f733d79","_id":"it-concat@1.0.2","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"shasum":"7229fedb935bcf7b2fcac23e040e7588b34143e6","size":3211,"noattachment":false,"key":"/it-concat/-/it-concat-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/it-concat/download/it-concat-1.0.2.tgz"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":""}],"_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/it-concat_1.0.2_1602498305873_0.48905413284066745"},"_hasShrinkwrap":false,"publish_time":1602498305971,"_cnpm_publish_time":1602498305971,"_cnpmcore_publish_time":"2021-12-16T19:09:52.564Z"},"1.0.1":{"name":"it-concat","version":"1.0.1","description":"Concat all buffers/strings yielded from an async iterable into a single BufferList/string","main":"index.js","scripts":{"test":"ava test.mjs --verbose","lint":"standard","coverage":"nyc --reporter=text --reporter=lcov npm test"},"keywords":["concat","join","glue","buffer","bufferlist","string","iterable","iterator","async"],"author":{"name":"Alan Shaw"},"license":"MIT","dependencies":{"bl":"^4.0.0"},"devDependencies":{"@types/bl":"^2.1.0","ava":"^3.12.1","nyc":"^15.1.0","random-bytes":"^1.0.0","random-int":"^2.0.1","standard":"^14.3.1"},"repository":{"type":"git","url":"git+https://github.com/alanshaw/it-concat.git"},"bugs":{"url":"https://github.com/alanshaw/it-concat/issues"},"homepage":"https://github.com/alanshaw/it-concat#readme","gitHead":"bc3d345cb79372a7952a8cc456df3fb90d1a9831","_id":"it-concat@1.0.1","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"shasum":"4ac61c1b0a2185c97e1bd004d45f625902f7d728","size":3214,"noattachment":false,"key":"/it-concat/-/it-concat-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/it-concat/download/it-concat-1.0.1.tgz"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":""}],"_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/it-concat_1.0.1_1599119257746_0.12983729777035857"},"_hasShrinkwrap":false,"publish_time":1599119257871,"_cnpm_publish_time":1599119257871,"_cnpmcore_publish_time":"2021-12-16T19:09:52.780Z"},"1.0.0":{"name":"it-concat","version":"1.0.0","description":"Concat all buffers/strings yielded from an async iterable into a single BufferList/string","main":"index.js","scripts":{"test":"ava test.js --verbose","lint":"standard","coverage":"nyc --reporter=text --reporter=lcov npm test"},"keywords":["concat","join","glue","buffer","bufferlist","string","iterable","iterator","async"],"author":{"name":"Alan Shaw"},"license":"MIT","dependencies":{"bl":"^4.0.0"},"devDependencies":{"@types/bl":"^2.1.0","ava":"^2.4.0","nyc":"^14.1.1","random-bytes":"^1.0.0","random-int":"^2.0.1","standard":"^14.3.1"},"repository":{"type":"git","url":"git+https://github.com/alanshaw/it-concat.git"},"bugs":{"url":"https://github.com/alanshaw/it-concat/issues"},"homepage":"https://github.com/alanshaw/it-concat#readme","gitHead":"154922f09080be97ae59d75fea10e26cb947453d","_id":"it-concat@1.0.0","_nodeVersion":"13.1.0","_npmVersion":"6.12.1","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"shasum":"26df98dcaea89aa775cce4d082c15fdf527a8bd0","size":3195,"noattachment":false,"key":"/it-concat/-/it-concat-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/it-concat/download/it-concat-1.0.0.tgz"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/it-concat_1.0.0_1575028005283_0.28851147124697496"},"_hasShrinkwrap":false,"publish_time":1575028005517,"_cnpm_publish_time":1575028005517,"_cnpmcore_publish_time":"2021-12-16T19:09:52.987Z"}},"readme":"# it-concat\n\n[![codecov](https://img.shields.io/codecov/c/github/alanshaw/it-concat.svg?style=flat-square)](https://codecov.io/gh/alanshaw/it-concat)\n[![CI](https://img.shields.io/github/actions/workflow/status/alanshaw/it-concat/js-test-and-release.yml?branch=master\\&style=flat-square)](https://github.com/alanshaw/it-concat/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)\n\n> Concat all buffers/strings yielded from an async iterable into a single BufferList/string\n\n# Install\n\n```console\n$ npm i it-concat\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `ItConcat` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/it-concat/dist/index.min.js\"></script>\n```\n\n## Usage\n\nConcat Uint8Arrays to a single [`Uint8ArrayList`](https://www.npmjs.com/package/uint8arraylist):\n\n```js\nimport concat from 'it-concat'\nimport { toString } from 'uint8arrays'\nimport fs from 'fs'\n\nfs.writeFileSync('./test.txt', 'Hello World!')\n\n// Node.js Readable Streams are async iterables!\nconst chunks = await concat(fs.createReadStream('./test.txt'))\n\n// chunks is a Uint8ArrayList\nconsole.log(chunks)\n/*\nUint8ArrayList {\n  _bufs: [ <Uint8Array 48 65 6c 6c 6f 20 57 6f 72 6c 64 21> ],\n  length: 12\n}\n*/\nconsole.log(toString(chunks.subarray)))\n// Hello World!\n```\n\nConcat Uint8Arrays to a single *string*:\n\n```js\nimport concat from 'it-concat'\nimport fs from 'fs'\n\nfs.writeFileSync('./test.txt', 'Hello World!')\n\n// Node.js Readable Streams are async iterables!\n// Note that we pass `{ type: 'string' }` to tell concat that we want a string\n// back and not a Uint8Array. This is necessary because the source data is Uint8Array(s).\nconst chunks = await concat(fs.createReadStream('./test.txt'), { type: 'string' })\n\nconsole.log(chunks)\n// Hello World!\n```\n\nConcat strings to a single string:\n\n```js\nimport concat from 'it-concat'\nimport fs from 'fs'\n\nfs.writeFileSync('./test.txt', 'Hello World!')\n\n// Node.js Readable Streams are async iterables!\n// Note that we don't need to pass `{ type: 'string' }` to tell concat that we\n// want a string back because the source data is Uint8Array(s).\nconst chunks = await concat(fs.createReadStream('./test.txt', { encoding: 'utf8' }))\n\nconsole.log(chunks)\n// Hello World!\n```\n\n## API\n\n```js\nimport concat from 'it-concat'\n```\n\n### `concat(source, options?): Promise`\n\nConcat all Uint8Arrays or strings yielded from the async iterable `source` into a single [`Uint8ArrayList`](https://www.npmjs.com/package/bl) or `string`.\n\n- `source` (`AsyncIterable<Uint8Array | Uint8ArrayList | string>`) - the source iterable to concat from\n- `options` (`Object`) - optional options\n- `options.type` (`string`) - return type of the function, pass `'string'` to recieve a string or `'Uint8Array'` for a `Uint8ArrayList`.\n\nReturns a `Promise` that resolves to a `Uint8ArrayList` or `string`.\n\nIf `options.type` is *not* passed the type of the objects yielded from the `source` is detected and a `Uint8ArrayList` or `string` is returned appropriately. If the `source` does not yield anything an empty `Uint8ArrayList` is returned. If the source is expected to return strings (but may not yield anything), pass `options.type: 'string'` to ensure an empty string is returned instead of an empty `Uint8ArrayList`.\n\n## Related\n\n- [`stream-to-it`](https://www.npmjs.com/package/stream-to-it) Convert Node.js streams to streaming iterables\n- [`it-pipe`](https://www.npmjs.com/package/it-pipe) Utility to \"pipe\" async iterables together\n\n[List of awesome modules for working with async iterables](https://github.com/alanshaw/it-awesome).\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","_attachments":{},"homepage":"https://github.com/alanshaw/it-concat#readme","bugs":{"url":"https://github.com/alanshaw/it-concat/issues"},"license":"Apache-2.0 OR MIT"}