Skip to content

Commit

Permalink
doc: add unref for input in readline
Browse files Browse the repository at this point in the history
  • Loading branch information
AnupamaP committed Apr 1, 2021
1 parent 31fe3b2 commit 5921b8f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/api/readline.md
Expand Up @@ -628,6 +628,12 @@ the best compatibility if it defines an `output.columns` property and emits
a `'resize'` event on the `output` if or when the columns ever change
([`process.stdout`][] does this automatically when it is a TTY).

In order to end the wait for the `stdin` input stream (so that the program does not appear to have hanged), `unref` function can be used:

```js
process.stdin.unref();
```

### Use of the `completer` function

The `completer` function takes the current line entered by the user
Expand Down

0 comments on commit 5921b8f

Please sign in to comment.