aboutsummaryrefslogtreecommitdiff
path: root/main.ts
blob: 75777857b3ad95eb3fa2907917383226863fc093 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { Countries } from "./countries.ts";

const countries = new Countries();

await countries.sync();

const arg = Deno.args[0];

if (arg === "sync") {
  await countries.sync({ force: true });
}

if (arg === "random") {
  countries.print(countries.random());
}

if (arg === "find") {
  countries.print(Deno.args[1]);
}