Skip to main content
Module

x/hono/router/trie-router/node.ts>Node

Ultrafast web framework for the Edge
Extremely Popular
Go to Latest
class Node
import { Node } from "https://deno.land/x/hono@v3.1.2/router/trie-router/node.ts";

Constructors

new
Node(
method?: string,
handler?: T,
children?: Record<string, Node<T>>,
)

Properties

children: Record<string, Node<T>>
handlerSetCache: Record<string, HandlerSet<T>[]>
methods: Record<string, HandlerSet<T>>[]
name: string
order: number
patterns: Pattern[]
shouldCapture: boolean

Methods

private
getHandlerSets(
node: Node<T>,
method: string,
wildcard?: boolean,
): HandlerSet<T>[]
insert(
method: string,
path: string,
handler: T,
): Node<T>
search(method: string, path: string): Result<T> | null