Skip to content
Myr

handler.ts

This file

Path

src/utils/handler.ts

15 lines · 481 bytes · TypeScript

Last changed by

Merge pull request #2769 from honojs/nextYusuke Wadabefore adoptionacd3634

History of this file

Take it

The walk stopped after 200 commits: lines older than 10ed77f point at it.

Merge pull request #2769 from honojs/nextYusuke Wadabefore adoptionacd3634

lines 1–5why, one step back
1/**
2 * @module3 * Handler utility.4 */5

v4.1.3Yusuke Wadabefore adoption10ed77f

lines 6–15why, one step back
6import { COMPOSED_HANDLER } from '../hono-base'
78export const isMiddleware = (handler: Function) => handler.length > 19export const findTargetHandler = (handler: Function): Function => {10 // eslint-disable-next-line @typescript-eslint/no-explicit-any11 return (handler as any)[COMPOSED_HANDLER]12 ? // eslint-disable-next-line @typescript-eslint/no-explicit-any13 findTargetHandler((handler as any)[COMPOSED_HANDLER])14 : handler15}