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 4a1dd5f point at it.

Revert "fix(etag): fallback if `res.clone()` is not supported (#4198)" (#4200)Yusuke Wadabefore adoption4a1dd5f

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}