-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: general improvements to readline.md copy #7022
Conversation
If `output` is set to `null` or `undefined` when calling `createInterface`, | ||
nothing is displayed. | ||
*Note* Once this code is invoked, the Node.js application will not | ||
terminate until the `readline` interface is closed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to explain here that this is because the interface waits for data from the input stream? Feel free to omit if you think that would go too much into detail.
See also: #6996 … Maybe cherry-pick that into this PR as a second commit? |
If #6996 lands first I'll rebase this on it. If this lands first, I'll cherry pick it in |
Nits fixed! |
const readline = require('readline'); | ||
const rl = readline.createInterface(process.stdin, process.stdout); | ||
|
||
rl.setPrompt('OHAI> '); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe 'Tiny> '
? (No need to change if you'd like to keep the ohai though imo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meh, I'm good with ohai for the example
80f7270
to
95383e0
Compare
Nits addressed. @nodejs/documentation ... one final look please :-) |
ping @nodejs/documentation |
LGTM |
95383e0
to
da86df3
Compare
da86df3
to
1d7e233
Compare
Rebased to resolve conflicts after the added details were added |
Clarify that readline's rl.question() callback does not use the err back pattern. Fixes: nodejs#4833
PR-URL: #7022 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: #7022 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Checklist
Affected core subsystem(s)
doc (readline)
Description of change
General improvements to readline.md copy
@nodejs/documentation