Skip to content

Commit 0fcfa68

Browse files
committed
docs: point to parseArgs for non-trivial argument parsing
Anyone past 'flat list of strings' will want a real parser. Mention both the Deno std and node:util versions and let the reader pick.
1 parent 2ce138a commit 0fcfa68

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

runtime/getting_started/command_line_interface.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ $ deno run main.ts arg1 arg2 arg3
6363
[ "arg1", "arg2", "arg3" ]
6464
```
6565

66+
For anything beyond a flat list, parse the arguments with
67+
[`parseArgs` from `jsr:@std/cli`](https://jsr.io/@std/cli/doc/parse-args/~/parseArgs)
68+
or
69+
[`parseArgs` from `node:util`](https://nodejs.org/api/util.html#utilparseargsconfig).
70+
6671
## Argument and flag ordering
6772

6873
:::caution

0 commit comments

Comments
 (0)