Args

Parse arguments from the terminal.

parse : Array String -> Result

Parse an array of strings that's returned by the gren-lang/node package Terminal module.

For examples and more detailed documentation on how this works, check the package README.

type OptionType
= ShortOption
| LongOption

The type of option passed.

ShortOption represents an option passed with a single - character. LongOption represents an option passed with two - characters.

type alias Result =
{ args : Array String
, options : Dict String { optionType : OptionType, values : Array String }
}

The result of parsing a set of arguments.