Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 14f6cee

Browse filesBrowse files
cjihrigtargos
authored andcommitted
doc: reformat for-await-of
Instead of `for`-`await`-`of`, prefer `for await...of`. PR-URL: #28425 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 3fea2e4 commit 14f6cee
Copy full SHA for 14f6cee

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎doc/api/readline.md‎

Copy file name to clipboardExpand all lines: doc/api/readline.md
+3-3Lines changed: 3 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ changes:
322322

323323
Create an `AsyncIterator` object that iterates through each line in the input
324324
stream as a string. This method allows asynchronous iteration of
325-
`readline.Interface` objects through `for`-`await`-`of` loops.
325+
`readline.Interface` objects through `for await...of` loops.
326326

327327
Errors in the input stream are not forwarded.
328328

@@ -556,7 +556,7 @@ rl.on('line', (line) => {
556556

557557
A common use case for `readline` is to consume an input file one line at a
558558
time. The easiest way to do so is leveraging the [`fs.ReadStream`][] API as
559-
well as a `for`-`await`-`of` loop:
559+
well as a `for await...of` loop:
560560

561561
```js
562562
const fs = require('fs');
@@ -597,7 +597,7 @@ rl.on('line', (line) => {
597597
});
598598
```
599599

600-
Currently, `for`-`await`-`of` loop can be a bit slower. If `async` / `await`
600+
Currently, `for await...of` loop can be a bit slower. If `async` / `await`
601601
flow and speed are both essential, a mixed approach can be applied:
602602

603603
```js

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.