1
2
3
4
5
// SPDX-License-Identifier: 0BSD
import type { MiddlewareHandler } from "npm:hono";
export const toHonoHandler =
(handler: (req?: Request) => Promise<Response>): MiddlewareHandler => async (c) => (c.res = await handler(c.req.raw));