File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ rl.question('What do you think of Node.js? ', (answer) => {
2727});
2828```
2929
30- * Note* Once this code is invoked, the Node.js application will not
30+ * Note* : Once this code is invoked, the Node.js application will not
3131terminate until the ` readline.Interface ` is closed because the interface
3232waits for data to be received on the ` input ` stream.
3333
@@ -447,6 +447,10 @@ autocompletion is disabled when copy-pasted input is detected.
447447
448448If the ` stream ` is a [ TTY] [ ] , then it must be in raw mode.
449449
450+ * Note* : This is automatically called by any readline instance on its ` input `
451+ if the ` input ` is a terminal. Closing the ` readline ` instance does not stop
452+ the ` input ` from emitting ` 'keypress' ` events.
453+
450454``` js
451455readline .emitKeypressEvents (process .stdin );
452456if (process .stdin .isTTY )
You can’t perform that action at this time.
0 commit comments