MatUtter MatUtter - 1 year ago 68
Node.js Question

How to make NodeJS addon show property info like a regular object

I have an addon created with several prototypes but when I try to

console.log( myinstace )
the're no properties listed.
is the result. The desired outcome would be something like below. How do I make this happen?

Local<FunctionTemplate> self = FunctionTemplate::New(New);
, FunctionTemplate::New(method)


console.log( myinstance ); // desired { Method : [Function: Method ] }

Answer Source

In general using inspect from the util package will give the deepest examination of an objects properties and prototypes.

const util = require('util')
var mod = require(...)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download