Analyzer::Javascript::Express
Inherits Analyzer::Javascript::ExpressConstants < Analyzer::Javascript::JavascriptEngine < Analyzer < FileHelper < Reference < Object
Constants
Precompiled once — a single PCRE2-JIT scan replaces six naive String#includes? substring scans over the whole file content. Regex.union auto-escapes each literal, so this is provably equivalent to the OR-of-includes? it replaces.
Constants for method chaining detection
Deliberate exception to "no name lists": package-provided serving
factories (swaggerUi.serve, express.static, serveIndex, …) have no
definition in the scan to read, and register a GET route at the mount
path (or GET + POST for GraphQL / Apollo middleware) rather than all
seven methods.
Class methods
Instance methods
Helper method to handle multi-line route definitions
Instance-side view of the same declaration. The per-file rescues live on
this base class, which has no way to name the analyzer that is running
inside them, so a skipped file could not be attributed to a tech.
Deriving it from analyzer_for keeps the name written exactly once.