MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / isRouteHandler

Function isRouteHandler

packages/hono/src/shared/resolveRouteName.ts:7–9  ·  view source on GitHub ↗
(handler: unknown)

Source from the content-addressed store, hash-verified

5// Arity alone is enough here (unlike `wrapSubAppMiddleware` in patchRoute.ts, which also needs position)
6// We only want the path, and inline middleware shares its handler's path.
7function isRouteHandler(handler: unknown): boolean {
8 return typeof handler === 'function' && !isMiddleware(handler);
9}
10
11/**
12 * Resolves the route path of the matched handler for the transaction name.

Callers 1

resolveRouteNameFunction · 0.85

Calls 1

isMiddlewareFunction · 0.90

Tested by

no test coverage detected