Home / Function/ getDecorator() — fastify Function Reference

getDecorator() — fastify Function Reference

Architecture documentation for the getDecorator() function in reply.js from the fastify codebase.

Entity Profile

Dependency Diagram

graph TD
  d2fd46bb_f46d_60e5_6829_0e6d43faf76b["getDecorator()"]
  4bcd71dc_1ec2_5fe8_b8ff_4a371e392925["reply.js"]
  d2fd46bb_f46d_60e5_6829_0e6d43faf76b -->|defined in| 4bcd71dc_1ec2_5fe8_b8ff_4a371e392925
  style d2fd46bb_f46d_60e5_6829_0e6d43faf76b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

lib/reply.js lines 475–486

Reply.prototype.getDecorator = function (name) {
  if (!decorators.hasKey(this, name) && !decorators.exist(this, name)) {
    throw new FST_ERR_DEC_UNDECLARED(name, 'reply')
  }

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

  return decorator
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does getDecorator() do?
getDecorator() is a function in the fastify codebase, defined in lib/reply.js.
Where is getDecorator() defined?
getDecorator() is defined in lib/reply.js at line 475.

Analyze Your Own Codebase

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

Try Supermodel Free