Skip to content
Myr

handler.ts

This file

Path

src/utils/handler.ts

15 lines · 480 bytes · TypeScript

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 82bdc4d point at it.

4.9.0Yusuke Wadabefore adoption82bdc4d

lines 1–15why, one step back
1/**
2 * @module3 * Handler utility.4 */56import { COMPOSED_HANDLER } from './constants'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}