import { Deno } from "https://deno.land/x/ayonli_jsext@v0.9.72/lib.deno.d.ts";
const { args } = Deno;
Returns the script arguments to the program.
Give the following command line invocation of Deno:
deno run --allow-read https://examples.deno.land/command-line-arguments.ts Sushi
Then Deno.args
will contain:
[ "Sushi" ]
If you are looking for a structured way to parse arguments, there is the
std/flags
module as part of the Deno
standard library.