Skip to main content
Module

x/cmd/mod.ts>Option

Commander.js (command-line interfaces) for Deno.
Latest
class Option
import { Option } from "https://deno.land/x/cmd@v1.2.0/mod.ts";

Constructors

new
Option(flags: string, description?: string)

Initialize a new Option with the given flags and description.

Properties

optional
defaultValue: string
description: string
flags: string
long: string
mandatory: boolean
negate: boolean
optional: boolean
required: boolean
optional
short: string

Methods

Return option name, in a camelcase format that can be used as a object attribute key.

is(arg?: string)

Check if arg matches the short or long flag.

Return option name.