CodeQL library for JavaScript
Search

Module Routing

A model of routing trees, describing the composition of route handlers and middleware functions in a web server application. See Routing::Node for more details.

Import path

import javascript

Predicates

getNode

Gets the routing node corresponding to the value of node.

getRouteHandler

Gets the RouteHandler node corresponding to the given function.

getRouteSetupNode

Gets the routing node corresponding to the route installed at the given route setup.

Classes

Node

A node in a routing tree modeling the composition of middleware functions and route handlers.

RootNode

A node in the routing tree which has no parent.

RouteHandler

A function that handles an incoming request.

RouteHandlerParameter

A parameter to a route handler function.

RouteHandlerTrackingStep

An edge that should be used for tracking route handler definitions to their use-sites.

RouteSetup

A node representing a place where one or more routes are installed onto a mutable router object.

Modules

RouteSetup

Companion module to the RouteSetup class, containing classes that can be use to contribute new kinds of route setups.

Router

Provides classes for generating Router nodes, to be subclassed by framework models.

ValueNode

Companion module to the Node class, containing abstract classes that can be used to extend the routing model.