-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
lib: created isValidCallback validator #32665
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 because we call one more stack now. and not more readable for the coder
@himself65 One can also say that repeating the code can be moved into one place, following DRY (Don't repeat your code). |
Maybe it can be moved to |
@rickyes nice suggestion as this error code is being consumed by other modules as well. I think changing in other modules can be taken in some other PR as not related to the scope of this PR. Will go forward with |
a9a5337
to
7d4316e
Compare
check for callback function is moved to a separate function. This piece of code is being shared by other entities as well.
7d4316e
to
7ef2f2a
Compare
check for callback function is moved to a separate function. This piece of code is being shared by other entities as well. PR-URL: #32665 Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
Landed in 55b4d03 |
check for callback function is moved to a separate function. This piece of code is being shared by other entities as well. PR-URL: #32665 Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
check for callback function is moved to a separate function. This piece of code is being shared by other entities as well. PR-URL: nodejs#32665 Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
check for callback function is moved to a separate function. This piece of code is being shared by other entities as well. PR-URL: #32665 Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
check for callback function is moved to a separate function. This piece of code is being shared by other entities as well. PR-URL: #32665 Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
A crucial part of the timers function is to execute the callback function, and
this check is needed by several variants of timer functions and by other modules as well. So to
isolate the checking to a comman function that can be shared by different blocks and thus no need to reimplement the samee thing.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes