stream-to-it
Version:
Convert Node.js streams to streaming iterables
9 lines • 535 B
TypeScript
/// <reference types="node" />
import type { Readable } from 'node:stream';
/**
* Convert a Node.js [`Readable`](https://nodejs.org/dist/latest/docs/api/stream.html#class-streamreadable)
* stream or a browser [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
* to an [iterable source](https://achingbrain.github.io/it-stream-types/types/Source.html).
*/
export declare function source<T = Uint8Array>(readable: Readable | ReadableStream<T>): AsyncGenerator<T>;
//# sourceMappingURL=source.d.ts.map