{"id":17399235,"url":"https://github.com/feross/stream-to-blob-url","last_synced_at":"2025-09-13T00:32:40.811Z","repository":{"id":57372103,"uuid":"48766332","full_name":"feross/stream-to-blob-url","owner":"feross","description":"Convert a Readable Stream to a Blob URL","archived":false,"fork":false,"pushed_at":"2020-05-25T04:23:23.000Z","size":31,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-03T02:53:06.251Z","etag":null,"topics":["blob","blob-url","javascript","nodejs","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":"2015-12-29T20:42:49.000Z","updated_at":"2024-03-25T15:15:48.000Z","dependencies_parsed_at":"2022-08-30T16:42:45.030Z","dependency_job_id":null,"html_url":"https://github.com/feross/stream-to-blob-url","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fstream-to-blob-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fstream-to-blob-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fstream-to-blob-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fstream-to-blob-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feross","download_url":"https://codeload.github.com/feross/stream-to-blob-url/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232802573,"owners_count":18578685,"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","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","blob-url","javascript","nodejs","stream"],"created_at":"2024-10-16T15:13:44.655Z","updated_at":"2025-01-07T00:18:15.975Z","avatar_url":"https://github.com/feross.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stream-to-blob-url [![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-url/master.svg\n[travis-url]: https://travis-ci.org/feross/stream-to-blob-url\n[npm-image]: https://img.shields.io/npm/v/stream-to-blob-url.svg\n[npm-url]: https://npmjs.org/package/stream-to-blob-url\n[downloads-image]: https://img.shields.io/npm/dm/stream-to-blob-url.svg\n[downloads-url]: https://npmjs.org/package/stream-to-blob-url\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n\n#### Convert a Readable Stream to a Blob URL\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/stream-to-blob-url.svg)](https://saucelabs.com/u/stream-to-blob-url)\n\nThis package converts a Readable Stream into a Blob URL.\n\nThis package is used by [WebTorrent](https://webtorrent.io).\n\n## install\n\n```\nnpm install stream-to-blob-url\n```\n\n## usage\n\n```js\nconst toBlobURL = require('stream-to-blob-url')\nconst fs = require('fs')\n\nconst blobUrl = await toBlobURL(fs.createReadStream('file.txt'))\nconsole.log(url)\n```\n\n## api\n\n### promise = toBlobURL(stream, [mimeType], callback)\n\nConvert the Readable `stream` into a W3C `Blob` URL (`blob:...`), optionally,\nwith the given `mimeType`.\n\nReturns a `Promise` which resolves to a `string` on success. Otherwise, rejects\nwith 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-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeross%2Fstream-to-blob-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Fstream-to-blob-url/lists"}