Module

Minimist

Package
purescript-minimist
Repository
mcoffin/purescript-minimist

#MinimistOptions Source

data MinimistOptions

Phantom data type of options for the minimist parser

#interpretAsStrings Source

interpretAsStrings :: Option MinimistOptions (Array String)

Array of strings to always be interpreted as strings

#interpretAsBooleans Source

interpretAsBooleans :: Option MinimistOptions (Either Boolean (Array String))

Array of strings to always be interpreted as booleans or a boolean value indicating that all options starting with -- that don't contain an equals sign should be interpreted as booleans

#aliases Source

aliases :: Option MinimistOptions (StrMap (Array String))

Mapping of strings to a list of aliases for that option

#defaults Source

defaults :: Option MinimistOptions (StrMap Arg)

Mapping of strings to default argument values

#stopEarly Source

stopEarly :: Option MinimistOptions Boolean

When true, argument parsing will stop at the first non-flag

#splitOnDoubleDash Source

splitOnDoubleDash :: Option MinimistOptions Boolean

When true, all options appearing after -- will be placed into -- instead of _ in the result mapping

#unknown Source

unknown :: Option MinimistOptions (String -> Boolean)

Function to be called with every argument not found in the configuration object. If the function retruns false, then the argument is not added to argv.

#Arg Source

data Arg

Data type representing the value of an argument in argv

Constructors

Instances

#parseArgs Source

parseArgs :: Array String -> Options MinimistOptions -> StrMap Arg

Parse arguments with a set of minimist options into an argv representation, mapping argument names to Arg values.

Modules
Minimist