Generalize the server definition in plugin registration

This commit is contained in:
Mauro Baluda
2022-11-15 16:27:14 +01:00
committed by GitHub
parent 563a56af9d
commit e5e3bb3705

View File

@@ -20,11 +20,11 @@ module Hapi {
// `register (server, options)`
// `module.exports.plugin = {register, pkg};`
this =
any(NodeModule m)
any(Module m)
.getAnExportedValue("plugin")
.(DataFlow::ObjectLiteralNode)
.getALocalSource()
.getAPropertySource("register")
.(DataFlow::FunctionNode)
.getAFunctionValue()
.getParameter(0)
or
// `const after = function (server) {...};`