MCPcopy Create free account
hub / github.com/fastify/fastify / checkDependencies

Function checkDependencies

lib/plugin-utils.js:65–78  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

63}
64
65function checkDependencies (fn) {
66 const meta = getMeta(fn)
67 if (!meta) return
68
69 const dependencies = meta.dependencies
70 if (!dependencies) return
71 assert(Array.isArray(dependencies), 'The dependencies should be an array of strings')
72
73 dependencies.forEach(dependency => {
74 if (!this[kRegisteredPlugins].includes(dependency)) {
75 throw new FST_ERR_PLUGIN_DEPENDENCY_NOT_REGISTERED(dependency, meta.name)
76 }
77 })
78}
79
80function checkDecorators (fn) {
81 const meta = getMeta(fn)

Callers

nothing calls this directly

Calls 1

getMetaFunction · 0.85

Tested by

no test coverage detected