Use Deno global var instead of built-in "deno" module (denoland/deno_std#247)

Original: 395392912d
This commit is contained in:
Yoshiya Hinosawa 2019-03-08 09:25:16 +09:00 committed by Ryan Dahl
parent fd74b38d36
commit f90f62fa52
19 changed files with 36 additions and 27 deletions

View file

@ -1,12 +1,10 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import * as deno from "deno";
async function cat(filenames: string[]): Promise<void> {
for (let filename of filenames) {
let file = await deno.open(filename);
await deno.copy(deno.stdout, file);
let file = await Deno.open(filename);
await Deno.copy(Deno.stdout, file);
file.close();
}
}
cat(deno.args.slice(1));
cat(Deno.args.slice(1));