radix3.mts
This file
Path
benchmarks/routers/src/radix3.mts
17 lines 路 371 bytes 路 TypeScript
Last changed by
Not known.
History of this fileTake it
123456789101112131415161718import { createRouter } from 'radix3'import type { RouterInterface } from './tool.mts'import { routes, handler } from './tool.mts'
const name = 'radix3'const router = createRouter()
for (const route of routes) { router.insert(route.path, handler)}
export const radix3Router: RouterInterface = { name, match: (route) => { router.lookup(route.path) },}