mirror of
https://github.com/denoland/deno.git
synced 2024-11-23 15:16:54 -05:00
bcbbee7399
Adds deno.stdin, deno.stdout, deno.stderr, deno.open(), deno.write(), deno.read(), deno.Reader, deno.Writer, deno.copy(). Fixes #721. tests/cat.ts works.
11 lines
226 B
TypeScript
11 lines
226 B
TypeScript
import { stdout, open, copy, args } from "deno";
|
|
|
|
async function main() {
|
|
for (let i = 1; i < args.length; i++) {
|
|
let filename = args[i];
|
|
let file = await open(filename);
|
|
await copy(stdout, file);
|
|
}
|
|
}
|
|
|
|
main();
|