Adds back the custom inspection functions for node.js, first added by #281 then removed by #318 and [55ac17e]. This change avoids the default node's object inspection listing all fields recursively. This time there are no node imports or any run-time dependency. We simply expose the inspect functions as symbol-named attribute Symbol.for('nodejs.util.inspect.custom') as described in the docs.
Note: I've simplified the formats from the original addition to make it single line and simpler.
Adds back the custom inspection functions for node.js, first added by #281 then removed by #318 and [55ac17e]. This change avoids the default node's object inspection listing all fields recursively. This time there are no node imports or any run-time dependency. We simply expose the inspect functions as symbol-named attribute
Symbol.for('nodejs.util.inspect.custom')
as described in the docs.Note: I've simplified the formats from the original addition to make it single line and simpler.
Testing done
// output: Duration { values: {"seconds":10} } Interval { start: 2023-10-09T16:20:51.017-03:00, end: 2023-10-10T16:20:51.019-03:00 } DateTime { ts: 2023-10-10T16:20:59.623-03:00, zone: America/Sao_Paulo, locale: en-US }