mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-20 05:40:17 +08:00
* Support static util.parseArgs - Lower typed util.parseArgs calls through the C and LLVM backends. - Add a link-gated native parser with Node-compatible options, tokens, defaults, and errors. - Cover ESM, CommonJS, default argv, sanitizer, and TS7 behavior. * fix(runtime): align parseArgs behavior with Node * fix(runtime): close parseArgs parity gaps * fix(runtime): match parseArgs edge cases * fix(runtime): preserve parseArgs short and default semantics
6 lines
265 B
TypeScript
6 lines
265 B
TypeScript
// Omitted args reads process.argv.slice(2); the corpus run pins the empty
|
|
// case, while focused CLI validation invokes the compiled binary with args.
|
|
import { parseArgs } from "node:util";
|
|
|
|
console.log(JSON.stringify(parseArgs({ strict: false, tokens: true })));
|