readable-web-to-node-stream icon indicating copy to clipboard operation
readable-web-to-node-stream copied to clipboard

you know that there is a built in option for this... right?

Open jimmywarting opened this issue 3 years ago • 3 comments
trafficstars

stream.Readable.fromWeb(readableStream[, options])

https://nodejs.org/dist/latest-v18.x/docs/api/stream.html#streamreadablefromwebreadablestream-options

jimmywarting avatar Sep 14 '22 08:09 jimmywarting

This is still potentially useful for projects like https://github.com/isomorphic-git/lightning-fs , which are trying to ponyfill out a Node.js fs implementation from within the browser.

AFAIK there's no way to use any Node.js code in the browser. It'd be awesome if some of the Node.js JS implementations were available as standalone modules via npm.

rektide avatar Oct 02 '22 19:10 rektide

@jimmywarting this module is helpful for browser bundler such as webpack because module "readable-stream" has not yet implemented the latest Readable Nodejs API.

ecofi avatar Mar 14 '24 19:03 ecofi

stream.Readable.fromWeb is experimental and it could change between node version changes. This project provides a stable interface to it that you don't have to worry about when changing between node versions.

faridnsh avatar May 12 '24 08:05 faridnsh