CodeQL library for JavaScript/TypeScript
codeql/javascript-all 0.8.13 (changelog, source)
Search

Member predicate Express::RouterDefinition::getMiddlewareStackAt

Gets the last middleware in the given router at node.

For example:

app = express()
app.use(auth)
app.use(throttle)

After line one, the router has no middleware. After line two, the router has auth on top of its middleware stack, and after line three, the router has throttle on top of its middleware stack.

If node is not in the same container where router was defined, the predicate has no result.

RouteHandlerNode getMiddlewareStackAt(ControlFlowNode node)