CodeQL library for JavaScript

Member predicate Express::RouterDefinition::getMiddlewareStackAt

Gets the last middleware in the given router at node.

For example:

app = express()

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.

RouteHandlerExpr getMiddlewareStackAt(ControlFlowNode node)