Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hono/router/reg-exp-router/router.ts>RegExpRouter

Fast, Lightweight, Web-standards
Extremely Popular
Go to Latest
class RegExpRouter
implements Router<T>
import { RegExpRouter } from "https://deno.land/x/hono@v3.12.5/router/reg-exp-router/router.ts";

Constructors

new
RegExpRouter()

Properties

optional
middleware: Record<string, Record<string, HandlerWithMetadata<T>[]>>
name: string
optional
routes: Record<string, Record<string, HandlerWithMetadata<T>[]>>

Methods

private
buildAllMatchers(): Record<string, Matcher<T>>
private
buildMatcher(method: string): Matcher<T> | null
add(
method: string,
path: string,
handler: T,
)
match(method: string, path: string): Result<T>