read-next-line
Version:
Reads text lines from stream
17 lines (16 loc) • 491 B
TypeScript
import type { Readable } from 'node:stream';
export { LineSplitter } from "./LineSplitter.js";
export declare class ReadNextLine {
private reader;
private done;
constructor(stream: ReadableStream<Uint8Array> | Readable);
/**
* Reads the next line from the stream.
* If there are no more lines and the stream is done, returns null.
*/
readLine(): Promise<string | null>;
/**
* Release the lock on the internal reader
*/
release(): void;
}