From 68d287eed5dcdc7b84a317fa90c4c9131389c0b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 22 Apr 2020 21:30:45 +0200 Subject: BREAKING CHANGE: rename Deno.toAsyncIterator() to Deno.iter() (#4848) * rename Deno.toAsyncIterator() to Deno.iter() * adds sync version Deno.iterSync() * adds optional second argument for buffer size --- std/http/io.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'std') diff --git a/std/http/io.ts b/std/http/io.ts index b6bbfa17b..37285fdbf 100644 --- a/std/http/io.ts +++ b/std/http/io.ts @@ -164,7 +164,7 @@ export async function writeChunkedBody( r: Deno.Reader ): Promise { const writer = BufWriter.create(w); - for await (const chunk of Deno.toAsyncIterator(r)) { + for await (const chunk of Deno.iter(r)) { if (chunk.byteLength <= 0) continue; const start = encoder.encode(`${chunk.byteLength.toString(16)}\r\n`); const end = encoder.encode("\r\n"); -- cgit v1.2.3