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

x/ayonli_jsext/workerd/cli.ts>args

A JavaScript extension package for building strong and modern applications.
Latest
variable args
import { args } from "https://deno.land/x/ayonli_jsext@v0.9.72/workerd/cli.ts";

The command-line arguments passed to the program.

This variable is the same as Deno.args in Deno and process.argv.slice(2) in Node.js or Bun.

Examples

Example 1

// main.ts
// launch with `deno run main.ts --name=Bob --age=30`
// or `node main.js --name=Bob --age=30`
// or `bun run main.ts --name=Bob --age=30`
import { args } from "@ayonli/jsext/cli";

console.log(args);
// [
//     "--name=Bob",
//     "--age=30"
// ]

type

string[]