Home / Function/ _checkDecorators() — fastify Function Reference

_checkDecorators() — fastify Function Reference

Architecture documentation for the _checkDecorators() function in plugin-utils.js from the fastify codebase.

Entity Profile

Dependency Diagram

graph TD
  4715dd4f_4ad3_663f_d551_3b6740e93a1f["_checkDecorators()"]
  7351467e_fa74_55c1_e257_0dfcb434a1e3["plugin-utils.js"]
  4715dd4f_4ad3_663f_d551_3b6740e93a1f -->|defined in| 7351467e_fa74_55c1_e257_0dfcb434a1e3
  dc418532_7b8b_47eb_eef3_55012a902bb9["checkDecorators()"]
  dc418532_7b8b_47eb_eef3_55012a902bb9 -->|calls| 4715dd4f_4ad3_663f_d551_3b6740e93a1f
  style 4715dd4f_4ad3_663f_d551_3b6740e93a1f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

lib/plugin-utils.js lines 98–107

function _checkDecorators (that, instance, decorators, name) {
  assert(Array.isArray(decorators), 'The decorators should be an array of strings')

  decorators.forEach(decorator => {
    const withPluginName = typeof name === 'string' ? ` required by '${name}'` : ''
    if (!checks[instance].call(that, decorator)) {
      throw new FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE(decorator, withPluginName, instance)
    }
  })
}

Domain

Subdomains

Defined In

Called By

Frequently Asked Questions

What does _checkDecorators() do?
_checkDecorators() is a function in the fastify codebase, defined in lib/plugin-utils.js.
Where is _checkDecorators() defined?
_checkDecorators() is defined in lib/plugin-utils.js at line 98.
What calls _checkDecorators()?
_checkDecorators() is called by 1 function(s): checkDecorators.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free