We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, firstly I'd like to thank you for writing a great book. I purchased it yesterday and already found it very helpful.
One question I have concerns the way you validate whether /api/get/{id} returns an actual result from the database:
/api/get/{id}
if (typeof result !== 'undefined') { return reply(result); }
Why not take advantage of the type coercion and simply:
if (result) { return reply(result); }
Does typeof cover some exceptional cases I do not foresee?
typeof
Thank you very much!
The text was updated successfully, but these errors were encountered:
I also want to know that.
Sorry, something went wrong.
No branches or pull requests
Hi, firstly I'd like to thank you for writing a great book. I purchased it yesterday and already found it very helpful.
One question I have concerns the way you validate whether
/api/get/{id}
returns an actual result from the database:Why not take advantage of the type coercion and simply:
Does
typeof
cover some exceptional cases I do not foresee?Thank you very much!
The text was updated successfully, but these errors were encountered: