mirror of
https://github.com/denoland/deno.git
synced 2024-10-30 09:08:00 -04:00
3542f2de0c
Previously https://github.com/denoland/deno_examples
Original: 14be9a0e82
11 lines
256 B
TypeScript
11 lines
256 B
TypeScript
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);
|
|
file.close();
|
|
}
|
|
}
|
|
|
|
cat(deno.args.slice(1));
|