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

x/hono/router/smart-router/index.ts>SmartRouter

Lightweight, Ultrafast, Web Standards
Very Popular
Go to Latest
class SmartRouter
implements Router<T>
import { SmartRouter } from "https://deno.land/x/hono@v3.7.1/router/smart-router/index.ts";

Constructors

new
SmartRouter(init: Pick<SmartRouter<T>, "routers">)

Properties

readonly
activeRouter
name: string
routers: Router<T>[]
optional
routes: [string, string, T][]

Methods

add(
method: string,
path: string,
handler: T,
)
match(method: string, path: string): Result<T> | null