Convert a Readable Stream to a Blob
npm install stream-to-blob[travis-image]: https://img.shields.io/travis/feross/stream-to-blob/master.svg
[travis-url]: https://travis-ci.org/feross/stream-to-blob
[npm-image]: https://img.shields.io/npm/v/stream-to-blob.svg
[npm-url]: https://npmjs.org/package/stream-to-blob
[downloads-image]: https://img.shields.io/npm/dm/stream-to-blob.svg
[downloads-url]: https://npmjs.org/package/stream-to-blob
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
[standard-url]: https://standardjs.com
#### Convert a Readable Stream to a Blob

This package converts a Readable Stream into a Blob.
This package is used by WebTorrent.
```
npm install stream-to-blob
`js
const streamToBlob = require('stream-to-blob')
const stream = new stream.Readable() // any Node.js readable stream
const blob = await streamToBlob(stream)
`
Convert 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.
Returns a Promise which resolves to a Blob object on success. Otherwise, rejects with an Error`.
MIT. Copyright (c) Feross Aboukhadijeh.