import * as mod from "https://deno.land/std@0.176.0/flags/mod.ts";
Command line arguments parser based on minimist.
This module is browser compatible.
Examples
Example 1
Example 1
import { parse } from "https://deno.land/std@0.176.0/flags/mod.ts";
console.dir(parse(Deno.args));
$ deno run https://deno.land/std/examples/flags.ts -a beep -b boop
{ _: [], a: 'beep', b: 'boop' }
$ deno run https://deno.land/std/examples/flags.ts -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
{ _: [ 'foo', 'bar', 'baz' ],
x: 3,
y: 4,
n: 5,
a: true,
b: true,
c: true,
beep: 'boop' }
Functions
Take a set of command line arguments, optionally with a set of options, and return an object representing the flags found in the passed arguments. |
Interfaces
The options for the |
Type Aliases
T Args | The value returned from |