Skip to content

Commit

Permalink
docs(cli): remove parseArgs() console logs from examples (#6268)
Browse files Browse the repository at this point in the history
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
  • Loading branch information
timreichen and kt3k authored Dec 16, 2024
1 parent 16c4136 commit 4763ec0
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions cli/parse_args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* Command line arguments parser based on
* {@link https://github.com/minimistjs/minimist | minimist}.
*
* @example
* @example Usage
* ```ts
* import { parseArgs } from "@std/cli/parse-args";
*
* console.dir(parseArgs(Deno.args));
* const args = parseArgs(Deno.args);
* ```
*
* @module
Expand Down Expand Up @@ -278,14 +278,18 @@ export interface ParseOptions<
*
* @default {false}
*
* @example
* @example Double dash option is false
* ```ts
* // $ deno run example.ts -- a arg1
* import { parseArgs } from "@std/cli/parse-args";
* const args = parseArgs(Deno.args, { "--": false }); // args equals { _: [ "a", "arg1" ] }
* ```
*
* @example Double dash option is true
* ```ts
* // $ deno run example.ts -- a arg1
* import { parseArgs } from "@std/cli/parse-args";
* console.dir(parseArgs(Deno.args, { "--": false }));
* // output: { _: [ "a", "arg1" ] }
* console.dir(parseArgs(Deno.args, { "--": true }));
* // output: { _: [], --: [ "a", "arg1" ] }
* const args = parseArgs(Deno.args, { "--": true }); // args equals { _: [], --: [ "a", "arg1" ] }
* ```
*/
"--"?: TDoubleDash;
Expand Down

0 comments on commit 4763ec0

Please sign in to comment.