blob-stream
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/blob-stream package

0.1.3 • Public • Published

blob-stream

A Node-style writable stream for HTML5 Blobs, mostly useful in Browserify. 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 of the library.

browser support

Example

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.3
    122,537
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.3
    122,537
  • 0.1.2
    1
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i blob-stream

Weekly Downloads

122,538

Version

0.1.3

License

MIT

Last publish

Collaborators

  • devongovett