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

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