handler.ts
This file
Path
src/utils/handler.ts
10 lines 路 441 bytes 路 TypeScript
Last changed by
refactor(ssg): filter SSG Route (#2181)watanybefore adoption06fcf68
History of this fileTake it
1234567891011import { COMPOSED_HANDLER } from '../hono-base'
export const isMiddleware = (handler: Function) => handler.length > 1export const findTargetHandler = (handler: Function): Function => { // eslint-disable-next-line @typescript-eslint/no-explicit-any return (handler as any)[COMPOSED_HANDLER] ? // eslint-disable-next-line @typescript-eslint/no-explicit-any findTargetHandler((handler as any)[COMPOSED_HANDLER]) : handler}