-
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
Expect to expose getDefaultVerbatim
method
#46919
Comments
Can you explain why you want to know that? I'm trying to think of reasonable use cases but I'm coming up empty-handed. To a first approximation, as a library author, you're not expected to care. That's the responsibility of the application. As an application programmer, you normally configure it at startup and then never change nor care about it later. |
After I start a node service, if I use According to the results of the above judgment, I will decide whether to update the local value printed on the terminal. |
Maybe I misunderstand you but that seems of really limited utility. Why would it matter if the value changed between reloads? Is it purely a diagnostic? |
Yeah, the situation I am currently encountering is mainly to compare the values before and after the change and make some changes. However, since the logic of changing the dnsOrder value is not in the same file as the logic that requires other processing, I think it would be convenient to dynamically obtain the values before and after the change for comparison. In addition, it suddenly occurred to me that by comparing the results of |
I understand what you're saying now but I don't know if it passes the bar for inclusion in the standard library. Can I suggest you open a pull request and see how it's received? |
I agree with Ben; I think repeatedly switching between |
Do you mean to open a pull request to expose the |
I'll leave that up to you. What you think is best. |
Ok, I created a pr exposing the method |
PR-URL: nodejs#46973 Fixes: nodejs#46919 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
PR-URL: nodejs#46973 Fixes: nodejs#46919 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
PR-URL: nodejs#46973 Fixes: nodejs#46919 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
PR-URL: nodejs#46973 Fixes: nodejs#46919 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
What is the problem this feature will solve?
When the
dnsOrder
value of the dns module changes, I hope to get the modified value or judge that the value has changed. Therefore, I want to exposegetDefaultVerbatim
method or expose a new methodgetDefaultResultOrder
.node/lib/internal/dns/utils.js
Lines 278 to 280 in c4103c1
What is the feature you are proposing to solve the problem?
Judging whether dnsOrder has changed according to the exposed api.
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: