import { type ArgParsingOptions } from "https://dotland.deno.dev/std@0.36.0/flags/mod.ts";
Properties
When true
, populate the result _
with everything before the --
and
the result ['--']
with everything after the --
. Here's an example:
const { args } = Deno;
import { parse } from "https://deno.land/std/flags/mod.ts";
// options['--'] is now set to false
console.dir(parse(args, { "--": false }));
// $ deno example.ts -- a arg1
// output: { _: [ "example.ts", "a", "arg1" ] }
// options['--'] is now set to true
console.dir(parse(args, { "--": true }));
// $ deno example.ts -- a arg1
// output: { _: [ "example.ts" ], --: [ "a", "arg1" ] }
Defaults to false
.
A boolean, string or array of strings to always treat as booleans. If
true
will treat all double hyphenated arguments without equal signs as
boolean
(e.g. affects --foo
, not -f
or --foo=bar
)