-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
readline module and streams #16178
Copy link
Copy link
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.readlineIssues and PRs related to the built-in readline module.Issues and PRs related to the built-in readline module.
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.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: