• 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.

    Returns

    A matched value.

    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

Generated using TypeDoc