MCPcopy
hub / github.com/fastify/fastify / plugin

Function plugin

test/plugin.3.test.js:27–34  ·  test/plugin.3.test.js::plugin
(instance, opts, done)

Source from the content-addressed store, hash-verified

25 t.after(() => fastify.close())
26
27 function plugin (instance, opts, done) {
28 instance.decorateRequest(class="st">'check', null)
29 instance.addHook(class="st">'onRequest', (req, reply, done) => {
30 req.check = {}
31 done()
32 })
33 setImmediate(done)
34 }
35 fastify.register(fp(plugin))
36
37 fastify.register((instance, options, done) => {

Callers

nothing calls this directly

Calls 2

addHookMethod · 0.80
doneFunction · 0.50

Tested by

no test coverage detected