Skip to main content

group

function group(
patternOrCombinator,
name?,
valueType?): Combinator;

A Combinator to group pattern. When name is provided, it will be one of the keys that returned from

Parameters

ParameterTypeDescription
patternOrCombinatorPatternCombinatorThe pattern to group
name?stringThe name for the capturing. when no provided, there is no capturing
valueType?ValueTypeThe type that the capture should be.

Returns

Combinator

See

  • Parser. This will be the main function to extract information for parsing
  • ValueType

Default Value

'string'