Home > @rushstack/node-core-library > Text > readLinesFromIterable
Text.readLinesFromIterable() 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 readLinesFromIterable(iterable: Iterable<string | Buffer | null>, options?: IReadLinesFromIterableOptions): Generator<string>;
Parameters
Parameter | Type | Description |
|---|---|---|
iterable | Iterable<string | Buffer | null> | An iterable object that returns strings or buffers |
options | (Optional) Options used when reading the lines from the provided iterable |
Returns:
Generator<string>