Skip to content

Commit

Permalink
doc: improve util.promisify() content in readline.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Apr 1, 2022
1 parent 1e5bafb commit 768aefc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions doc/api/readline.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ signal.addEventListener('abort', () => {
setTimeout(() => ac.abort(), 10000);
```

If this method is invoked as it's util.promisify()ed version, it returns a
Promise that fulfills with the answer. If the question is canceled using
Use `util.promisify()` to create a version that returns a
promise that fulfills with the answer. If the question is canceled using
an `AbortController` it will reject with an `AbortError`.

```js
Expand Down Expand Up @@ -899,8 +899,8 @@ signal.addEventListener('abort', () => {
setTimeout(() => ac.abort(), 10000);
```

If this method is invoked as it's util.promisify()ed version, it returns a
Promise that fulfills with the answer. If the question is canceled using
Use `util.promisify()` to create a version that returns a
promise that fulfills with the answer. If the question is canceled using
an `AbortController` it will reject with an `AbortError`.

```js
Expand Down Expand Up @@ -1445,4 +1445,5 @@ const { createInterface } = require('readline');
[`process.stdin`]: process.md#processstdin
[`process.stdout`]: process.md#processstdout
[`rl.close()`]: #rlclose
[`util.promisify()`]: util.md#utilpromisifyoriginal
[reading files]: #example-read-file-stream-line-by-line

0 comments on commit 768aefc

Please sign in to comment.