Function flatten

  • This overload makes a Matcher that concatenates values from all provided Matchers into a single array while flattening value arrays.

    Implementation is based on all and flatten1.

    Type Parameters

    • TToken

    • TOptions

    • TValue

    Parameters

    • Rest ...ps: Matcher<TToken, TOptions, TValue | TValue[]>[]

      Matchers sequence. Each parser can return a match with a value or an array of values.

    Returns Matcher<TToken, TOptions, TValue[]>

  • Make a parser that concatenates values from all provided parsers into a single array while flattening value arrays.

    Nonmatch is returned if any of parsers didn't match.

    Implementation is based on all and flatten1.

    Type Parameters

    • TToken

    • TOptions

    • TValue

    Parameters

    • Rest ...ps: Parser<TToken, TOptions, TValue | TValue[]>[]

      Parsers sequence. Each parser can return a match with a value or an array of values.

    Returns Parser<TToken, TOptions, TValue[]>

Generated using TypeDoc