Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/momentum/cli/commands/tool/base.tool.ts>cmd.Option

Momentum is an open-source framework for building server-side Deno applications in TypeScript. It provides the paradigms and design patterns to guide developers to create robust, scalable, and enterprise-grade applications.
Latest
class cmd.Option
import { cmd } from "https://deno.land/x/momentum@v0.8.2/cli/commands/tool/base.tool.ts";
const { Option } = cmd;

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.