class

Analyzer::Javascript::Elysia

Inherits Analyzer < FileHelper < Reference < Object

Constants

ELYSIA_MARKERS_RE = Regex.union("from 'elysia'", "from \"elysia\"", "require('elysia')", "require(\"elysia\")")

Precompiled once — a single PCRE2-JIT scan replaces four naive String#includes? substring scans over the whole file content. Regex.union auto-escapes each literal (including the parens in "require('elysia')"), so it is provably equivalent to the OR-of-includes? it replaces.

JS_EXTENSIONS = [".js", ".mjs", ".cjs", ".ts"]

Class methods

tech_name
Source

Instance methods

analyze
Source
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.

Source