minor
This commit is contained in:
parent
b753823786
commit
39309e6a07
19 changed files with 60 additions and 35 deletions
|
@ -283,7 +283,7 @@ for await (let commit of fetchCommits(repo)) {
|
|||
}
|
||||
```
|
||||
|
||||
We'd like a call, like `fetchCommits(repo)` to get commits for us, making requests whenever needed. And let it care about all pagination stuff, for us it'll be a simple `for await..of`.
|
||||
We'd like to make a function `fetchCommits(repo)` that gets commits for us, making requests whenever needed. And let it care about all pagination stuff, for us it'll be a simple `for await..of`.
|
||||
|
||||
With async generators that's pretty easy to implement:
|
||||
|
||||
|
@ -361,4 +361,4 @@ In web-development we often meet streams of data, when it flows chunk-by-chunk.
|
|||
|
||||
We can use async generators to process such data, but it's also worth to mention that there's also another API called Streams, that provides special interfaces to work with such streams, to transform the data and to pass it from one stream to another (e.g. download from one place and immediately send elsewhere).
|
||||
|
||||
Streams API is not a part of JavaScript language standard.
|
||||
Streams API is not a part of JavaScript language standard.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue