{"_id":"stream-to-blob","_rev":"4652690","name":"stream-to-blob","description":"Convert a Readable Stream to a Blob","dist-tags":{"latest":"2.0.1"},"maintainers":[{"name":"feross","email":""}],"time":{"modified":"2026-04-10T20:48:23.000Z","created":"2016-06-15T15:38:35.222Z","2.0.1":"2020-05-10T17:06:25.832Z","2.0.0":"2019-07-10T17:03:28.971Z","1.0.2":"2019-06-28T22:50:19.615Z","1.0.1":"2018-06-09T23:02:46.474Z","1.0.0":"2016-06-15T15:38:35.222Z"},"users":{},"author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"https://feross.org"},"repository":{"type":"git","url":"git://github.com/feross/stream-to-blob.git"},"versions":{"2.0.1":{"name":"stream-to-blob","description":"Convert a Readable Stream to a Blob","version":"2.0.1","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"https://feross.org"},"bugs":{"url":"https://github.com/feross/stream-to-blob/issues"},"dependencies":{},"devDependencies":{"airtap":"^3.0.0","blob-to-buffer":"^1.2.6","standard":"*","string-to-stream":"^3.0.0","tape":"^5.0.0"},"engines":{"node":">=8"},"homepage":"https://github.com/feross/stream-to-blob","keywords":["blob","buffer","convert","convert stream to blob","length","name","stream"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/stream-to-blob.git"},"scripts":{"test":"standard && npm run test-browser","test-browser":"airtap -- test/*.js","test-browser-local":"airtap --local -- test/*.js"},"funding":[{"type":"github","url":"https://github.com/sponsors/feross"},{"type":"patreon","url":"https://www.patreon.com/feross"},{"type":"consulting","url":"https://feross.org/support"}],"gitHead":"3fd837cb1ef51470f73e27f28e8c01cc1c5c2712","_id":"stream-to-blob@2.0.1","_nodeVersion":"14.2.0","_npmVersion":"6.14.5","dist":{"shasum":"59ab71d7a7f0bfb899570e886e44d39f4ac4381a","size":2177,"noattachment":false,"key":"/stream-to-blob/-/stream-to-blob-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-to-blob/download/stream-to-blob-2.0.1.tgz"},"maintainers":[{"name":"feross","email":""}],"_npmUser":{"name":"feross","email":"feross@feross.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stream-to-blob_2.0.1_1589130385728_0.8472866373220751"},"_hasShrinkwrap":false,"publish_time":1589130385832,"_cnpm_publish_time":1589130385832,"_cnpmcore_publish_time":"2021-12-16T20:52:28.573Z"},"2.0.0":{"name":"stream-to-blob","description":"Convert a Readable Stream to a Blob","version":"2.0.0","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"https://feross.org/"},"bugs":{"url":"https://github.com/feross/stream-to-blob/issues"},"dependencies":{},"devDependencies":{"airtap":"2.0.2","blob-to-buffer":"^1.2.6","standard":"*","string-to-stream":"^2.0.0","tape":"^4.0.0"},"engines":{"node":">=8"},"homepage":"https://github.com/feross/stream-to-blob","keywords":["blob","buffer","convert","convert stream to blob","length","name","stream"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/stream-to-blob.git"},"scripts":{"test":"standard && npm run test-browser","test-browser":"airtap -- test/*.js","test-browser-local":"airtap --local -- test/*.js"},"gitHead":"be13c98276c16dc6b0e20c0ebde79c19f14e36d9","_id":"stream-to-blob@2.0.0","_nodeVersion":"10.16.0","_npmVersion":"6.10.0","dist":{"shasum":"3b71d5445eaf69025556237d2dfd0fc66fd142e7","size":2071,"noattachment":false,"key":"/stream-to-blob/-/stream-to-blob-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-to-blob/download/stream-to-blob-2.0.0.tgz"},"maintainers":[{"name":"feross","email":""}],"_npmUser":{"name":"feross","email":"feross@feross.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stream-to-blob_2.0.0_1562778208809_0.8384499513314043"},"_hasShrinkwrap":false,"publish_time":1562778208971,"_cnpm_publish_time":1562778208971,"_cnpmcore_publish_time":"2021-12-16T20:52:28.793Z"},"1.0.2":{"name":"stream-to-blob","description":"Convert a Readable Stream to a Blob","version":"1.0.2","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"http://feross.org/"},"bugs":{"url":"https://github.com/feross/stream-to-blob/issues"},"dependencies":{"once":"^1.3.3"},"devDependencies":{"airtap":"2.0.2","blob-to-buffer":"^1.2.6","standard":"*","string-to-stream":"^2.0.0","tape":"^4.0.0"},"homepage":"https://github.com/feross/stream-to-blob","keywords":["stream","buffer","convert stream to blob","blob","convert","length","name"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/stream-to-blob.git"},"scripts":{"test":"standard && npm run test-browser","test-browser":"airtap -- test/*.js","test-browser-local":"airtap --local -- test/*.js"},"gitHead":"4a834693edae27ecbf342b5e8f77e82696ce88ca","_id":"stream-to-blob@1.0.2","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"shasum":"3eeb699ad79ee2088db1a58dfe83c736578d708d","size":2007,"noattachment":false,"key":"/stream-to-blob/-/stream-to-blob-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-to-blob/download/stream-to-blob-1.0.2.tgz"},"maintainers":[{"name":"feross","email":""}],"_npmUser":{"name":"feross","email":"feross@feross.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stream-to-blob_1.0.2_1561762219482_0.9429958111789247"},"_hasShrinkwrap":false,"publish_time":1561762219615,"_cnpm_publish_time":1561762219615,"_cnpmcore_publish_time":"2021-12-16T20:52:29.017Z"},"1.0.1":{"name":"stream-to-blob","description":"Convert a Readable Stream to a Blob","version":"1.0.1","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"http://feross.org/"},"bugs":{"url":"https://github.com/feross/stream-to-blob/issues"},"dependencies":{"once":"^1.3.3"},"devDependencies":{"airtap":"0.0.7","blob-to-buffer":"^1.2.6","standard":"*","string-to-stream":"^1.0.1","tape":"^4.0.0"},"homepage":"https://github.com/feross/stream-to-blob","keywords":["stream","buffer","convert stream to blob","blob","convert","length","name"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/stream-to-blob.git"},"scripts":{"test":"standard && npm run test-browser","test-browser":"airtap -- test/*.js","test-browser-local":"airtap --local -- test/*.js"},"gitHead":"1318b864e346e0732684e373f7f0e71092a719f9","_id":"stream-to-blob@1.0.1","_npmVersion":"6.1.0","_nodeVersion":"8.11.2","_npmUser":{"name":"feross","email":"feross@feross.org"},"dist":{"shasum":"2dc1e09b71677a234d00445f8eb7ff70c4fe9948","size":2007,"noattachment":false,"key":"/stream-to-blob/-/stream-to-blob-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-to-blob/download/stream-to-blob-1.0.1.tgz"},"maintainers":[{"name":"feross","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stream-to-blob_1.0.1_1528585366411_0.739591756285847"},"_hasShrinkwrap":false,"publish_time":1528585366474,"_cnpm_publish_time":1528585366474,"_cnpmcore_publish_time":"2021-12-16T20:52:29.215Z"},"1.0.0":{"name":"stream-to-blob","description":"Convert a Readable Stream to a Blob","version":"1.0.0","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"http://feross.org/"},"bugs":{"url":"https://github.com/feross/stream-to-blob/issues"},"dependencies":{"once":"^1.3.3"},"devDependencies":{"blob-to-buffer":"^1.2.6","standard":"^7.0.0","string-to-stream":"^1.0.1","tape":"^4.0.0","zuul":"^3.0.0"},"homepage":"https://github.com/feross/stream-to-blob","keywords":["stream","buffer","convert stream to blob","blob","convert","length","name"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/stream-to-blob.git"},"scripts":{"test":"standard && npm run test-browser","test-browser":"zuul -- test/*.js","test-browser-local":"zuul --local -- test/*.js"},"gitHead":"46534277352ef0b8f25e112f4b97074000b5c7fe","_id":"stream-to-blob@1.0.0","_shasum":"9f7a1ada39e16ea282ebb7e4cda307edabde658d","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"feross","email":"feross@feross.org"},"dist":{"shasum":"9f7a1ada39e16ea282ebb7e4cda307edabde658d","size":3570,"noattachment":false,"key":"/stream-to-blob/-/stream-to-blob-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-to-blob/download/stream-to-blob-1.0.0.tgz"},"maintainers":[{"name":"feross","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/stream-to-blob-1.0.0.tgz_1466005109642_0.6272906833328307"},"directories":{},"publish_time":1466005115222,"_hasShrinkwrap":false,"_cnpm_publish_time":1466005115222,"_cnpmcore_publish_time":"2021-12-16T20:52:29.446Z"}},"readme":"# stream-to-blob [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]\n\n[travis-image]: https://img.shields.io/travis/feross/stream-to-blob/master.svg\n[travis-url]: https://travis-ci.org/feross/stream-to-blob\n[npm-image]: https://img.shields.io/npm/v/stream-to-blob.svg\n[npm-url]: https://npmjs.org/package/stream-to-blob\n[downloads-image]: https://img.shields.io/npm/dm/stream-to-blob.svg\n[downloads-url]: https://npmjs.org/package/stream-to-blob\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n#### Convert a Readable Stream to a Blob\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/stream-to-blob.svg)](https://saucelabs.com/u/stream-to-blob)\n\nThis package converts a Readable Stream into a Blob.\n\nThis package is used by [WebTorrent](https://webtorrent.io).\n\n## install\n\n```\nnpm install stream-to-blob\n```\n\n## usage\n\n```js\nconst streamToBlob = require('stream-to-blob')\n\nconst stream = new stream.Readable() // any Node.js readable stream\nconst blob = await streamToBlob(stream)\n```\n\n## api\n\n### promise = streamToBlob(stream, [mimeType])\n\nConvert the given readable stream, `stream`, into a W3C `Blob`. If `mimeType` is provided, then the `Blob` will have its mime type set to that value.\n\nReturns a `Promise` which resolves to a `Blob` object on success. Otherwise, rejects with an `Error`.\n\n## license\n\nMIT. Copyright (c) [Feross Aboukhadijeh](https://feross.org).\n","_attachments":{},"homepage":"https://github.com/feross/stream-to-blob","bugs":{"url":"https://github.com/feross/stream-to-blob/issues"},"license":"MIT"}