Module

x/lume/deps/flags.ts

🔥 Static site generator for Deno 🦕
Very Popular
Go to Latest
import * as mod from "https://dotland.deno.dev/x/lume@v1.14.1/deps/flags.ts";

Command line arguments parser based on minimist.

This module is browser compatible.

Examples

Example 1

import { parse } from "https://deno.land/std@$STD_VERSION/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 parse call.

Type Aliases

The value returned from parse.