Skip to main content

Function: parser()

parser(opts?): ArgvParser<object>

Small helper function to create a new parser instance.

Parameters

opts?: ParserOptions<object>

see ParserOptions

Returns

ArgvParser<object>

new parser, see ArgvParser

--?

optional --: string[]

Contains any arguments passed after --, which halts parsing of flags.

unmatched

unmatched: string[]

Contains any unmatched arguments as originally passed to the parser.

Defined in

packages/parser/src/lib/parser.ts:562