Skip to content

Conversation

BridgeAR
Copy link

Newer Node.js versions export a special symbol that should be used
to custom inspect objects. Otherwise the object itself would be
poluted.
This adds the symbol in the most backwards compatible way possible:
it prevents any deprecation message from showing up and behaves just
as before. Otherwise the custom inspection will break in Node.js 11.

I am not sure if it is the best way to tackle this, so I did not add any tests.

Newer Node.js versions export a special symbol that should be used
to custom inspect objects. Otherwise the object itself would be
poluted.
This adds the symbol in the most backwards compatible way possible:
it prevents any deprecation message from showing up and behaves just
as before. Otherwise the custom inspection will break in Node.js 11.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant