Skip to content

Commit

Permalink
fix(README): async iterator usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Mar 12, 2021
1 parent a779629 commit 50d2ef3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ for await (const response of octokit.paginate.iterator(
parameters
)) {
// do whatever you want with each response, break out of the loop, etc.
console.log(response.data.title);
const issues = response.data;
console.log("%d issues found", issues.length);
}
```

Expand All @@ -159,7 +160,8 @@ for await (const response of octokit.paginate.iterator(
parameters
)) {
// do whatever you want with each response, break out of the loop, etc.
console.log(response.data.title);
const issues = response.data;
console.log("%d issues found", issues.length);
}
```

Expand Down

0 comments on commit 50d2ef3

Please sign in to comment.