class
Analyzer::Javascript::Hapi
- Analyzer::Javascript::Hapi
- Analyzer
- Reference
- Object
Defined in:
analyzer/analyzers/javascript/hapi.crConstant Summary
-
HAPI_MARKERS_RE =
Regex.union("@hapi/hapi", "require('hapi')", "require(\"hapi\")", "from 'hapi'", "from \"hapi\"") -
Precompiled once — a single PCRE2-JIT scan replaces five naive String#includes? substring scans over the whole file content. Regex.union auto-escapes each literal (including the parens in "require('hapi')"), so it is provably equivalent to the OR-of-includes? it replaces.
-
JS_EXTENSIONS =
[".js", ".mjs", ".cjs", ".ts"]