Analyzer::Javascript::Express
Inherits Analyzer::Javascript::ExpressConstants < Analyzer::Javascript::JavascriptEngine < Analyzer < FileHelper < Reference < Object
Constants
EXPRESS_SOURCE_RE = Regex.union("require('express')", "require(\"express\")", "from 'express'", "from \"express\"", "express()", "express.Router(")
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.
MAX_CHAIN_METHOD_DISTANCE = 1000
Constants for method chaining detection
MAX_CHAIN_SEARCH_DISTANCE = 5000
Class methods
tech_name
SourceInstance methods
analyze
Sourceline_to_endpoint_multiline(line : String, next_line : String, router_detected : Bool = false) : Endpoint
Helper method to handle multi-line route definitions
tech
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.