Open this example in the interactive library
Source code
import { parseArgs } from "node:util";
console.log(
parseArgs({ args: ["build", "main"], allowPositionals: true }).positionals,
);
Sample output
[ 'build', 'main' ]

Open this example in the interactive library
import { parseArgs } from "node:util";
console.log(
parseArgs({ args: ["build", "main"], allowPositionals: true }).positionals,
);
[ 'build', 'main' ]