-
-
Notifications
You must be signed in to change notification settings - Fork 37.1k
readline module and streams #16178
Copy link
Copy link
Closed
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.readlineIssues and PRs related to the built-in readline module.Issues and PRs related to the built-in readline module.
Description
Activity
Metadata
Metadata
Assignees
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.readlineIssues and PRs related to the built-in readline module.Issues and PRs related to the built-in readline module.
Currently,
readlinemodule interface is rather special.Interfaceclass is EventEmitter acting as stream, but not conforming toStreaminterface. It's possible to redirect output to stream, but it's significantly less convenient than just.pipe.Then I propose one of the following:
readline.StreamsubclassingTransform.readline.Interfacecan be backed by this stream, then no code duplication occurs. Though, I'm not sure about viability of this approach, asInterfacecontains lots of code related to TTY handling.readline.Interfaceinstances subclasses ofTransformstreamCompare:
vs.
User-land packages providing this functionality: