peberminta - v0.10.0
    Preparing search index...

    Function takeMinMax

    • Make a parser that expects at least min and at most max sequential matches of the same parser.

      A nonmatch is returned if there are less than min matches.

      Does not consume more than max matches.

      Equivalent to takeN when min and max set to the same value - prefer using that.

      Equivalent to many when neither min nor max is set - prefer using that.

      Type Parameters

      • TToken
      • TOptions
      • TValue

      Parameters

      • p: Parser<TToken, TOptions, TValue>

        A parser.

      • min: undefined | number

        Minimum number of matches to take.

      • max: undefined | number

        Maximum number of matches to take.

      Returns Parser<TToken, TOptions, TValue[]>