Node.js 6 and anonymous objects

Does anyone know why, starting with Node.js 6.0, console.logsometimes it displays objects with a leading word anonymous?

anonymous {val: 123}

What does this mean and how to resist it?

I get it for objects from some libraries that I use.

+4
source share
1 answer

This is a function first introduced in Node.js 6.0.0, which when checking an object through the util.inspectprefix of anonymous objects with a string anonymous, when such objects are written to the console, which means an anonymous object of instantiation.

This does not affect functionality and is great for ignoring.

+4
source

All Articles