https://github.com/devongovett/blob-stream
A Node-style writable stream for HTML5 Blobs
https://github.com/devongovett/blob-stream
Last synced: about 1 year ago
JSON representation
A Node-style writable stream for HTML5 Blobs
- Host: GitHub
- URL: https://github.com/devongovett/blob-stream
- Owner: devongovett
- License: mit
- Created: 2014-04-12T22:38:11.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2022-01-25T14:36:13.000Z (over 4 years ago)
- Last Synced: 2025-03-30T02:05:10.631Z (about 1 year ago)
- Language: JavaScript
- Size: 182 KB
- Stars: 122
- Watchers: 4
- Forks: 21
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# blob-stream
A Node-style writable stream for [HTML5 Blobs](https://developer.mozilla.org/en-US/docs/Web/API/Blob),
mostly useful in [Browserify](http://browserify.org/). Allows you to take the output of any Node stream,
and turn it into a Blob or Blob URL for opening in the browser, uploading to a server, etc.
If you don't want to use Browserify, you can also
[download a prebuilt version](https://github.com/devongovett/blob-stream/releases) of the library.
[
](https://ci.testling.com/devongovett/blob-stream)
## Example
```javascript
var blobStream = require('blob-stream');
someStream
.pipe(blobStream())
.on('finish', function() {
// get a blob
var blob = this.toBlob();
// or get a blob URL
var url = this.toBlobURL();
window.open(url);
});
```
## License
MIT