Home > @rushstack/node-core-library > Text > readLinesFromIterableAsync
Text.readLinesFromIterableAsync() method
Read lines from an iterable object that returns strings or buffers, and return a generator that produces the lines as strings. The lines will not include the newline characters.
Signature:
static readLinesFromIterableAsync(iterable: AsyncIterable<string | Buffer>, options?: IReadLinesFromIterableOptions): AsyncGenerator<string>;
Parameters
Parameter | Type | Description |
|---|---|---|
iterable | AsyncIterable<string | Buffer> | An iterable object that returns strings or buffers |
options | (Optional) Options used when reading the lines from the provided iterable |
Returns:
AsyncGenerator<string>