-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Description
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
return ctx.stylize('[External]', 'special'); |
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.