Skip to content
Myr

handler.ts

This file

Path

src/utils/handler.ts

15 lines · 480 bytes · TypeScript

Last changed by

fix(hono-base): don't use Symbol for `COMPOSED_HANDLER` (#3773)Yusuke Wadabefore adoption5ca3825

History of this file

Take it

The walk stopped after 200 commits: lines older than 81a1f07 point at it.

fix(validator): support multipart headers without a space separating boundary (#3286)Ernest Badubefore adoption81a1f07

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

fix(hono-base): don't use Symbol for `COMPOSED_HANDLER` (#3773)Yusuke Wadabefore adoption5ca3825

line 6why, one step back
6import { COMPOSED_HANDLER } from './constants'

fix(validator): support multipart headers without a space separating boundary (#3286)Ernest Badubefore adoption81a1f07

lines 7–15why, one step back
7
8export 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}