Skip to content

Commit 768aefc

Browse files
committed
doc: improve util.promisify() content in readline.md
1 parent 1e5bafb commit 768aefc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/api/readline.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ signal.addEventListener('abort', () => {
355355
setTimeout(() => ac.abort(), 10000);
356356
```
357357

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

362362
```js
@@ -899,8 +899,8 @@ signal.addEventListener('abort', () => {
899899
setTimeout(() => ac.abort(), 10000);
900900
```
901901

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

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

0 commit comments

Comments
 (0)