extract-base-iterator
Version:
Base iterator for extract iterators like tar-iterator and zip-iterator
11 lines (10 loc) • 390 B
TypeScript
/**
* Read entire stream content as string
*
* Handles both flowing streams and streams that have already
* buffered data (using readable stream semantics).
*
* Node 0.8+ compatible.
*/
export type StreamToStringCallback = (error?: Error | null, result?: string) => void;
export default function streamToString(stream: NodeJS.ReadableStream, callback: StreamToStringCallback): void;