Skip to content

util.inspect(obj) should avoid obj.inspect access

For your consideration:

util.inspect(obj) accessing a property to check for existence seems strange. It is likely fine in the case of symbols. Prior to this commit writing inspectable proxies \w a get trap required node specific knowlede.

fixes: https://github.com/nodejs/node/issues/13414

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

unsure


note: as i've pulled the thread on this, I've realized the final result may not really be that great. So if you don't feel this is important my feelings wont be hurt if this is closed

Merge request reports

Loading