Skip to content

Commit 50d2ef3

Browse files
committed
fix(README): async iterator usage example
1 parent a779629 commit 50d2ef3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ for await (const response of octokit.paginate.iterator(
141141
parameters
142142
)) {
143143
// do whatever you want with each response, break out of the loop, etc.
144-
console.log(response.data.title);
144+
const issues = response.data;
145+
console.log("%d issues found", issues.length);
145146
}
146147
```
147148

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

0 commit comments

Comments
 (0)