class
Analyzer::Javascript::Express
Included Modules
Defined in:
analyzer/analyzers/javascript/express.crConstant Summary
-
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
Instance Method Summary
- #analyze
- #extract_path_from_route_handler(line : String) : String
- #line_to_endpoint(line : String, router_detected : Bool = false) : Endpoint
-
#line_to_endpoint_multiline(line : String, next_line : String, router_detected : Bool = false) : Endpoint
Helper method to handle multi-line route definitions
- #line_to_param(line : String) : Param