{"id":17399261,"url":"https://github.com/feross/stream-to-blob","last_synced_at":"2025-07-23T19:04:28.946Z","repository":{"id":51103551,"uuid":"61219423","full_name":"feross/stream-to-blob","owner":"feross","description":"Convert a Readable Stream to a Blob","archived":false,"fork":false,"pushed_at":"2021-05-23T21:08:55.000Z","size":90,"stargazers_count":59,"open_issues_count":2,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-06T19:47:20.457Z","etag":null,"topics":["blob","browser","javascript","readable-stream","stream"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feross.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-15T15:34:41.000Z","updated_at":"2025-03-24T01:46:50.000Z","dependencies_parsed_at":"2022-09-04T08:10:22.326Z","dependency_job_id":null,"html_url":"https://github.com/feross/stream-to-blob","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/feross/stream-to-blob","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fstream-to-blob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fstream-to-blob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fstream-to-blob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fstream-to-blob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feross","download_url":"https://codeload.github.com/feross/stream-to-blob/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fstream-to-blob/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266737576,"owners_count":23976390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blob","browser","javascript","readable-stream","stream"],"created_at":"2024-10-16T15:14:24.944Z","updated_at":"2025-07-23T19:04:28.891Z","avatar_url":"https://github.com/feross.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Fstream-to-blob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeross%2Fstream-to-blob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Fstream-to-blob/lists"}