handler.ts
This file
Path
src/utils/handler.ts
15 lines · 480 bytes · TypeScript
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 8f027e5 point at it.
fix(ssg): add `atom+xml` and `rss+xml` to `defaultExtensionMap` (#4899)Yuinbefore adoption8f027e5
lines 1–15why, one step back1/**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}