mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
feat: top-level-for-await (#3212)
This commit is contained in:
parent
51dd91a3cc
commit
aec5a646c9
18 changed files with 257 additions and 263 deletions
|
@ -1,8 +1,4 @@
|
|||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||
async function curl(url: string): Promise<void> {
|
||||
const res = await fetch(url);
|
||||
await Deno.copy(Deno.stdout, res.body);
|
||||
}
|
||||
|
||||
await curl(Deno.args[1]);
|
||||
Deno.exit(0);
|
||||
const url = Deno.args[1];
|
||||
const res = await fetch(url);
|
||||
await Deno.copy(Deno.stdout, res.body);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue