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

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