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

Add has method #332

Closed
ivan-tymoshenko opened this issue Aug 21, 2023 · 1 comment · Fixed by #337
Closed

Add has method #332

ivan-tymoshenko opened this issue Aug 21, 2023 · 1 comment · Fixed by #337

Comments

@ivan-tymoshenko
Copy link
Collaborator

See fastify/fastify#4986 (comment)

The has method should parse the given path in the same way as _on method does.

  1. It shouldn't modify the the existing tree structure or has any other side effects.
  2. Instead of throwing an error if path exists, the has method should return a boolean value here.
  3. It shouldn't be a copy/paste. _on and has methods should reuse the same code or even each other.
@mcollina
Copy link
Collaborator

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants