module

Analyzer::Javascript::ExpressConstants

Constants for Express router prefix tracking in CodeLocator

Constants

ENTRY_FILENAMES = ["server.js", "app.js", "index.js", "main.js", "server.ts", "app.ts", "index.ts", "main.ts"]

Common entry point filenames for Express applications

ENTRY_SUBDIRS = ["src", "lib", "app"]

Common subdirectories to check for entry points

JS_EXTENSIONS = [".js", ".ts", ".jsx", ".tsx"]

JavaScript/TypeScript file extensions

SKIP_IDENTIFIERS = ["req", "res", "next", "err", "error", "true", "false", "null", "undefined"]

Common identifiers to skip when scanning for router variables

Class methods

file_key(file_path : String) : Noir::LocatorKey(Array(String))

File- and function-level keys for the router prefixes this analyzer stashes in CodeLocator. The names are minted from the scanned path, so they cannot be constants — they come from the declared EXPRESS_ROUTER_PREFIX namespace instead, which is what puts them under the same lifecycle and enforcement as every other slot.

Source
function_key(file_path : String, function_name : String) : Noir::LocatorKey(Array(String))
Source