lines-async-iterator
Line by line async iterator for node.js
- Uses ESNext async iteration
- Use with
--harmony-async-iterator
flag - Can use with IxJS
- Supports custom promises
- Typescript definitions included
Usage
Installation
npm install --save lines-async-iterator# or yarn add lines-async-iterator
Example 1 (Basic)
const lines = ; { for awaitconst line of console; } ;
Example 2 (Custom promise)
const lines = ;const promisify = ; { for awaitconst line of console; } ;
Example 3 (IxJS)
const lines = ;const Ix = ; { const iterator = IxAsyncIterator ; console; for awaitconst line_1 line_2 of iterator console; } ;