Analyzer::Javascript::Fastify
Inherits Analyzer::Javascript::JavascriptEngine < Analyzer < FileHelper < Reference < Object
Constants
Markers that a file configures @fastify/autoload. Both the scoped
package and the legacy bare name are matched so older projects work.
Precompiled once — a single PCRE2-JIT scan replaces two naive
String#includes? substring scans. Regex.union auto-escapes each
literal, so it is provably equivalent to the OR-of-includes? it
replaces.
module.exports = routes / export default fp(routes): registered elsewhere.
Optionally wrapped: module.exports = fp(async function (f) {…}).
.query( is every database and search client's method, so unlike
route({ …, handler }) the call shape cannot vouch for the receiver.
It has to be a Fastify instance: conventionally named, or the first
parameter of a plugin function (inline in register(…), a function
handed to register(name, …), or a module's default export).
Cheap per-file gate ahead of the comment strip the markers are read from.
Markers indicating that HTTP QUERY method support is registered.
Compiled once — an interpolated regex literal would otherwise be rebuilt (full PCRE2 compile) for every method on every line.
A route's schema is its declared input, validated by Fastify itself.
Class methods
Instance methods
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.