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

x/hono/mod.ts>RegExpRouter

Ultrafast web framework for Cloudflare Workers, Deno, and Bun. Fast, but not only fast.
Extremely Popular
Go to Latest
class RegExpRouter
implements Router<T>
import { RegExpRouter } from "https://deno.land/x/hono@v2.1.0/mod.ts";

Properties

optional
routeData: { index: number; routes: Route<T>[]; methods: Set<string>; }

Methods

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