kinetex - v1.0.0-rc.1
    Preparing search index...

    Function compilePattern

    • Compile a URL pattern string into a matcher.

      Syntax: :name — named parameter (one segment) :name(regex) — named parameter with regex constraint

      •         — wildcard (one segment)
        

      ** — greedy wildcard (multiple segments)

      Examples: "/users/:id" → matches "/users/42", params: { id: "42" } "/files/**" → matches "/files/a/b/c", wildcards: ["a","b","c"] "/items/:id(\d+)" → matches "/items/99" only if id is numeric

      Parameters

      • pattern: string

      Returns URLPattern