Home / Function/ getInstanceDecorator() — fastify Function Reference

getInstanceDecorator() — fastify Function Reference

Architecture documentation for the getInstanceDecorator() function in decorate.js from the fastify codebase.

Entity Profile

Dependency Diagram

graph TD
  8264c18b_01b7_d987_173c_5466d71c415f["getInstanceDecorator()"]
  b5b3567f_29bc_3ac4_2dcc_eba5eeb01c3e["decorate.js"]
  8264c18b_01b7_d987_173c_5466d71c415f -->|defined in| b5b3567f_29bc_3ac4_2dcc_eba5eeb01c3e
  1a95bc02_b753_7419_3efc_0b867baa83a6["checkExistence()"]
  8264c18b_01b7_d987_173c_5466d71c415f -->|calls| 1a95bc02_b753_7419_3efc_0b867baa83a6
  style 8264c18b_01b7_d987_173c_5466d71c415f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

lib/decorate.js lines 36–46

function getInstanceDecorator (name) {
  if (!checkExistence(this, name)) {
    throw new FST_ERR_DEC_UNDECLARED(name, 'instance')
  }

  if (typeof this[name] === 'function') {
    return this[name].bind(this)
  }

  return this[name]
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does getInstanceDecorator() do?
getInstanceDecorator() is a function in the fastify codebase, defined in lib/decorate.js.
Where is getInstanceDecorator() defined?
getInstanceDecorator() is defined in lib/decorate.js at line 36.
What does getInstanceDecorator() call?
getInstanceDecorator() calls 1 function(s): checkExistence.

Analyze Your Own Codebase

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

Try Supermodel Free