async-line-reader
Version:
Read line-by-line from stream, using async.
36 lines (22 loc) • 773 B
Markdown
This library provides a convenient way to read line-wise from streams.
```bash
yarn add async-line-reader
npm i async-line-reader
```
Read line-wise from a stream:
```ts
const reader = new AsyncLineReader(stream)
const line = await reader.readLine()
```
Custom separator or encoding.
```ts
const reader = new AsyncLineReader(stream, ';', 'ascii')
const line = await reader.readLine()
```
For more detailed examples, please look into the `examples` and `test` folders.
This module is for your convienence if you want to read a stream line by line in a JS application that utilizes async/await. I did not see another library that proided a similar, convenient interface.