1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-14 18:08:52 -05:00

docs(fs): fix async iterator (#366)

This commit is contained in:
Alvaro 2019-05-01 22:45:30 +01:00 committed by Ryan Dahl
parent b6aaddbcc0
commit aa94463902

View file

@ -152,9 +152,13 @@ for (const fileInfo of walkSync()) {
} }
// Async // Async
for (const fileInfo of walk()) { async function printFilesPath() {
console.log(fileInfo.path); for await (const fileInfo of walk()) {
console.log(fileInfo.path);
}
} }
printFilesPath().then(() => console.log("Done!"));
``` ```
### writeJson ### writeJson