1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

fix Deno.iterSync() examples (#4855)

This commit is contained in:
Bartek Iwańczuk 2020-04-23 00:36:04 +02:00 committed by GitHub
parent e26c2cd7c8
commit 197a589a4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -607,7 +607,7 @@ declare namespace Deno {
/** **UNSTABLE**: new API, yet to be vetted
* Turns a SyncReader, `r`, into an iterator.
*
* let f = await open("/etc/passwd");
* let f = openSync("/etc/passwd");
* for (const chunk of iterSync(reader)) {
* console.log(chunk);
* }
@ -616,7 +616,7 @@ declare namespace Deno {
* Second argument can be used to tune size of a buffer.
* Default size of the buffer is 1024 bytes.
*
* let f = await open("/etc/passwd");
* let f = openSync("/etc/passwd");
* for (const chunk of iterSync(reader, 1024 * 1024)) {
* console.log(chunk);
* }