Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
Closed
Labels
promisesIssues and PRs related to ECMAScript promises.Issues and PRs related to ECMAScript promises.readlineIssues and PRs related to the built-in readline module.Issues and PRs related to the built-in readline module.
Description
An issue to not forget.
It would be handy to sync readline API with for-await support in readable streams, so we can do something like this (compare examples here and here):
'use strict';constreadline=require('readline');constfs=require('fs');asyncfunctionprocessLineByLine(filePath){constrli=readline.createInterface({input: fs.createReadStream(filePath),crlfDelay: Infinity});forawait(constlineofrli){console.log(line);}}processLineByLine('config.ini').catch(console.error);An evidence of need: "Alas" from Axel Rauschmayer.
An association: Perl <FILEHANDLE> operator.
devsnek, not-an-aardvark, prog1dev, benjamingr, ex1st and 16 more
Metadata
Metadata
Assignees
Labels
promisesIssues and PRs related to ECMAScript promises.Issues and PRs related to ECMAScript promises.readlineIssues and PRs related to the built-in readline module.Issues and PRs related to the built-in readline module.