mafintosh / streamx

An iteration of the Node.js core streams with a series of improvements.
MIT License
226 stars 16 forks source link

Add toWeb/fromWeb methods #80

Closed luiscastro193 closed 11 months ago

luiscastro193 commented 1 year ago

As requested in https://github.com/mafintosh/tar-stream/issues/157, it would be nice to have toWeb and fromWeb methods similar to Node's streams so we can interact with browser's APIs.

zacharygriffee commented 11 months ago

+1 This would make passing data between webworkers with streamx streams a lot easier. Cause web readable stream is transferable.

zacharygriffee commented 11 months ago

Just created a repo for a toWeb/fromWeb .... but object mode isn't supported... yet.

https://www.npmjs.com/package/streamx-webstream

luiscastro193 commented 11 months ago

Looks cool, thanks! I will give it a try.

luiscastro193 commented 11 months ago

It works like a charm. I guess this fixes the issue. Thanks again!