peberminta - v0.10.0
    Preparing search index...

    Function match

    • Utility function that provides a bit cleaner interface for running a Matcher over a string.

      Input string is broken down to characters as [...str] unless you provide a pre-split array.

      Type Parameters

      • TOptions
      • TValue

      Parameters

      • matcher: Matcher<string, TOptions, TValue>

        A matcher to run.

      • str: string | string[]

        Input string or an array of graphemes.

      • options: TOptions

        Parser options.

      Returns TValue

      A matched value.