carduh carduh - 1 year ago 112
Node.js Question

Store JS Object and return him - Nodejs addon

I am only trying to build a addon that only receives any object and return them back.


var is_object = addon.return_object(previous_object);


void return_object(const FunctionCallbackInfo<v8::Value>& args) {
Isolate* isolate = Isolate::GetCurrent();
HandleScope scope(isolate);

Local<Object> obj = Object::"From args"; //The missing part


Answer Source

The method is:

Local<Object> obj = args[arg_value]->ToObject();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download