Open this example in the interactive library
Source code
import { parseArgs } from "node:util";
console.log(
parseArgs({ args: ["--name", "Ada"], options: { name: { type: "string" } } })
.values.name,
);
Sample output
Ada

Open this example in the interactive library
import { parseArgs } from "node:util";
console.log(
parseArgs({ args: ["--name", "Ada"], options: { name: { type: "string" } } })
.values.name,
);
Ada