third() — astro Function Reference
Architecture documentation for the third() function in middleware.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD c8c8dc57_a1ca_9f1a_461c_873c9522947d["third()"] 66a5ef02_454b_899e_f367_20548926b8ee["middleware.js"] c8c8dc57_a1ca_9f1a_461c_873c9522947d -->|defined in| 66a5ef02_454b_899e_f367_20548926b8ee style c8c8dc57_a1ca_9f1a_461c_873c9522947d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/test/fixtures/reroute/src/middleware.js lines 34–43
export const third = defineMiddleware(async (context, next) => {
// just making sure that we are testing the change in context coming from `next()`
if (context.url.pathname.startsWith('/') && contextReroute === false) {
context.locals.auth = 'Third function called';
}
if (context.params?.id === '1234') {
context.locals.auth = 'Params changed'
}
return next();
});
Domain
Subdomains
Source
Frequently Asked Questions
What does third() do?
third() is a function in the astro codebase, defined in packages/astro/test/fixtures/reroute/src/middleware.js.
Where is third() defined?
third() is defined in packages/astro/test/fixtures/reroute/src/middleware.js at line 34.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free