blob-stream

A Node-style writable stream for HTML5 Blobs

MIT 4 个版本
安装
npm install blob-stream
yarn add blob-stream
pnpm add blob-stream
bun add blob-stream
README

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

版本列表
0.1.3 2014-11-24
0.1.2 2014-04-13
0.1.1 2014-04-13
0.1.0 2014-04-12