Options
All
  • Public
  • Public/Protected
  • All
Menu

@neoncitylights/cli-help-parser

Index

Variables

TOKEN_OPTION_BRACKET_OPTIONAL: "[" = '['
TOKEN_OPTION_BRACKET_REQUIRED: "<" = '<'
TOKEN_OPTION_HYPHEN: "-" = '-'
TOKEN_OPTION_SEPARATOR: "," = ','
TOKEN_OPTION_VARIADIC: "..." = '...'
TOKEN_SPACE: " " = ' '
TOKEN_SUBCOMMAND_SEPARATOR: "|" = '|'

Functions

  • doBracketsMatch(openBracket: string, closeBracket: string): boolean
  • Parameters

    • openBracket: string
    • closeBracket: string

    Returns boolean

  • getClosingBracket(openBracket: string): string
  • isAsciiDigit(character: string): boolean
  • Verifies that the given character is an ASCII digit, checking in the inclusive range between U+0030 and U+0039:

    • U+0039: DIGIT ZERO
    • U+0030: DIGIT NINE

    Parameters

    • character: string

    Returns boolean

  • isAsciiLetter(character: string): boolean
  • Verifies that the given character is an ASCII letter, checking in the ranges between:

    • [U+0041, U+005A]: Latin lowercase letters (a..z)
    • [U+0061, U+007A]: Latin uppercase letters (A..Z)

    Parameters

    • character: string

    Returns boolean

  • parseAllOptions(options: string): Fig.Option[]
  • parseArgumentToken(argumentValue: string): Fig.Arg
  • Parses an argument syntax literal like <value...> into an abstract token

    Syntax:

    • Required arguments are denoted with <>
    • Optional arguments are denoted with []
    • Variadic arguments are denoted with an ellipsis (three dots) via ...
    throws

    BracketParseError

    Parameters

    • argumentValue: string

    Returns Fig.Arg

  • parseOptionLineToken(optionLineValue: string): Fig.Option
  • parseOptionToken(optionValue: string): Fig.Option
  • Parses an option literal like -c, --config <value...> into an abstract token

    Parameters

    • optionValue: string

    Returns Fig.Option

  • sortByLengthDescending(items: string[]): string[]

Generated using TypeDoc