From f90f62fa52eccd020026b6899de1b3c7ae0288b6 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Fri, 8 Mar 2019 09:25:16 +0900 Subject: Use Deno global var instead of built-in "deno" module (denoland/deno_std#247) Original: https://github.com/denoland/deno_std/commit/395392912d69fe320d74c1f95a27be8e4adc0fa6 --- examples/cat.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/cat.ts b/examples/cat.ts index 38fdbb2cc..ba8b42bdf 100644 --- a/examples/cat.ts +++ b/examples/cat.ts @@ -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 { 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)); -- cgit v1.2.3