-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Make it possible to give externals names/util.inspect.custom #28250
Labels
feature request
Issues that request new features to be added to Node.js.
util
Issues and PRs related to the built-in util module.
Comments
bnoordhuis
added
feature request
Issues that request new features to be added to Node.js.
util
Issues and PRs related to the built-in util module.
labels
Jun 17, 2019
I think an override using |
I'm working on this now |
I think the only practical solution here would be to print the underlying pointer value if |
Hi, I'd like to work on this. |
3 tasks
rosaxxny
added a commit
to rosaxxny/node
that referenced
this issue
Jul 23, 2020
rosaxxny
added a commit
to rosaxxny/node
that referenced
this issue
Jul 31, 2020
Fixes: nodejs#28250 PR-URL: nodejs#34398 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feature request
Issues that request new features to be added to Node.js.
util
Issues and PRs related to the built-in util module.
Is your feature request related to a problem? Please describe.
In hyperdivision/hid we use externals as handles for device opaque descriptors, however during debugging it's hard to know what exactly you are working with. I want to preserve the opaqueness of the handles, but it would be nice if I could give these externals a name.
Describe the solution you'd like
Currently externals end up here in
util.inspect
:node/lib/internal/util/inspect.js
Line 748 in 2b8b230
I don't know if this should be another API in N-API, the possibility of setting
util.inspect.custom
or similar.Describe alternatives you've considered
object_wrap
is another alternative, but comes with much more features and boilerplate than I need. I just want to be able to give human readable names to opaque references for debugging.The text was updated successfully, but these errors were encountered: