Converting from v8::Arguments to C++ Types

I know this is an older topic, but the way I tend to do this is as follows:

Handle<Value> MethodName (const Arguments& args) {

    // get the param
    v8::String::Utf8Value param1(args[0]->ToString());

    // convert it to string
    std::string foo = std::string(*param1);    

}

Leave a Comment

tech