node-web-stream-adapters
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

node-readable-stream

Utilities to convert Node.js Readable ans Writable streams to web ReadableStream and WritableStream streams.

These helpers are are usefull since Readable.toWeb, Readable.toWeb, Writable.toWeb and Writable.fromWeb are experimentals as of Node.js version 22.

##Usage:

npm i node-readable-stream
import fs from "fs";
import { toReadableStream } from "node-readable-stream";

const buffer = readFileAsync('some-file');
const stream = createReadableStreamFromReadable(Readable.from(buffer));
// or
const stream = createReadableStreamFromBuffer(buffer);

Package Sidebar

Install

npm i node-web-stream-adapters

Weekly Downloads

31

Version

0.1.0

License

MIT

Unpacked Size

15.2 kB

Total Files

18

Last publish

Collaborators

  • bstefanescu