Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/xdg/vendor/types/deno.d.ts>Deno.args

Determine XDG Base Directory paths (OS/platform portable)
Go to Latest
variable Deno.args
import { Deno } from "https://deno.land/x/xdg@v10.5.1/vendor/types/deno.d.ts";
const { args } = Deno;

Returns the script arguments to the program. If for example we run a program:

deno run --allow-read https://deno.land/std/examples/cat.ts /etc/passwd

Then Deno.args will contain:

[ "/etc/passwd" ]

type

string[]