Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/lume/deps/flags.ts

🔥 Static site generator for Deno 🦕
Very Popular
Go to Latest
import * as lume from "https://deno.land/x/lume@v1.19.0/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@0.224.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 parse call.

Type Aliases

The value returned from parse.