Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add fastify.display-name symbol #4191

Merged
merged 4 commits into from
Aug 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/Reference/Server.md
Original file line number Diff line number Diff line change
Expand Up @@ -1116,8 +1116,10 @@ three ways to define a name (in order).

1. If you use [fastify-plugin](https://github.com/fastify/fastify-plugin) the
metadata `name` is used.
2. If you `module.exports` a plugin the filename is used.
3. If you use a regular [function
2. If the exported plugin has the `Symbol.for('fastify.display-name')` property
set. Eg: `pluginFn[Symbol.for('fastify.display-name')] = "Custom Name"`
Eomm marked this conversation as resolved.
Show resolved Hide resolved
3. If you `module.exports` a plugin the filename is used.
4. If you use a regular [function
declaration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions#Defining_functions)
the function name is used.

Expand Down